summaryrefslogtreecommitdiff
path: root/git-changes
diff options
context:
space:
mode:
authorBen Sima <bsima@groq.com>2020-06-15 13:05:46 -0700
committerBen Sima <bsima@groq.com>2020-06-15 13:05:46 -0700
commite302b7e4f0a8b799fec2c3601ff458080ec3128c (patch)
tree4bf065b787d6138c2615eab54b5267ae5ef6e45f /git-changes
parent6e845a304d9ed416f16338319a276dcfe9e2f539 (diff)
Add git-changes script
Diffstat (limited to 'git-changes')
-rwxr-xr-xgit-changes10
1 files changed, 10 insertions, 0 deletions
diff --git a/git-changes b/git-changes
new file mode 100755
index 0000000..a964d0f
--- /dev/null
+++ b/git-changes
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+re='^[0-9]+$'
+if [[ $1 =~ $re ]]
+then
+ days=${1}
+ shift
+else
+ days='1'
+fi
+git shortlog --since=$(date -d "-${days}days" +%s) "$@"