summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <bsima@groq.com>2020-06-23 16:22:47 -0700
committerBen Sima <bsima@groq.com>2020-06-23 16:25:18 -0700
commit0bf6b946b613627eb971cb99115ba1c091d67df9 (patch)
tree994d74f1ccd46db726adf7c077c9515d5a1896da
parente302b7e4f0a8b799fec2c3601ff458080ec3128c (diff)
git-changes: don't show bot commits
-rwxr-xr-xgit-changes8
1 files changed, 7 insertions, 1 deletions
diff --git a/git-changes b/git-changes
index a964d0f..ce24cb9 100755
--- a/git-changes
+++ b/git-changes
@@ -1,4 +1,8 @@
#!/usr/bin/env bash
+#
+# Show a summary of changes, eg: 'git changes 2 src' shows two days of changes
+# in the 'src' directory.
+#
re='^[0-9]+$'
if [[ $1 =~ $re ]]
then
@@ -7,4 +11,6 @@ then
else
days='1'
fi
-git shortlog --since=$(date -d "-${days}days" +%s) "$@"
+git log --invert-grep --author="Bot" \
+ --format=short --since=$(date -d "-${days}days" +%s) "$@" \
+ | git shortlog