Created
November 11, 2016 17:54
-
-
Save danpoltawski/d06776b878a0c54fe91599227a5f8468 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
STARTDAY=20160102 | |
echo "Week beginning, fileschanged, insertions, deletion" | |
for i in $(seq 0 44); do | |
from=$(date +%Y-%m-%d --date $STARTDAY+${i}weeks) | |
j=$(($i+1)) | |
to=$(date +%Y-%m-%d --date $STARTDAY+${j}weeks) | |
fromcommit=$(git rev-list -n 1 --before=$from master) | |
tocommit=$(git rev-list -n 1 --before=$to master) | |
echo -n "$from, " | |
git diff --shortstat $fromcommit..$tocommit | sed 's/\([0-9]*\) files changed, \([0-9]*\) insertions(+), \([0-9]*\) deletions(-)/\1, \2, \3 /' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment