diff options
| author | Teddy Wing | 2015-08-18 03:26:19 -0400 |
|---|---|---|
| committer | Teddy Wing | 2015-08-18 03:26:19 -0400 |
| commit | 83027388670b18143593eef5f171925c97464a3a (patch) | |
| tree | 12db26022b87d59e5fdecb077000634c2b91ef5f | |
| parent | 51b1ee991f10bb69a4309f83eea31e71fad7b391 (diff) | |
| download | git-stats-83027388670b18143593eef5f171925c97464a3a.tar.bz2 | |
git-status.sh: First commit date WIP
Work in progress.
Working on showing a graph of the number of days since the first commit
for each committer. Getting hung up on the commit date for some reason.
It looks like it's exiting after getting the first date and I'm not sure
why. Going to commit what I have and go to bed or something and look at
this some other time.
| -rwxr-xr-x | git-stats.sh | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/git-stats.sh b/git-stats.sh index 450817b..f9027d6 100755 --- a/git-stats.sh +++ b/git-stats.sh @@ -32,8 +32,21 @@ echo "$colon_separated_shortlog" | asciigraph -l 'Commit count' --color contributors=$(echo "$colon_separated_shortlog" | cut -d: -f 1) -for name in $contributors; do - colon_separated_commit_word_count+=$name:$(git log --pretty='format:%B' --no-merges --author="$name" | wc -w | tr -d '[[:space:]]')$'\n' -done - -echo -n "$colon_separated_commit_word_count" | asciigraph -l 'Commit message word count' --color --sort=dec +# for name in $contributors; do +# colon_separated_commit_word_count+=$name:$(git log --pretty='format:%B' --no-merges --author="$name" | wc -w | tr -d '[[:space:]]')$'\n' +# done +# +# echo -n "$colon_separated_commit_word_count" | asciigraph -l 'Commit message word count' --color --sort=dec + + +while read -r name; do + echo $name + # echo $(git log --reverse --pretty='format:%ad' --author=""$name"" | head -n 1) + first_commit_date=$(git log --reverse --pretty='format:%ad' --author="$name" | head -n 1) + echo $first_commit_date + # days_since_first_commit=$(ruby -e 'require "date"; date = Date.parse("' $first_commit_date '"); puts (Date.today - date).to_i') + # colon_separated_days_since_first_commit+=$name:$days_since_first_commit$'\n' +done <<< "$contributors" + +# echo -n "$colon_separated_days_since_first_commit" +# echo -n "$colon_separated_days_since_first_commit" | asciigraph -l 'Days since first commit' --color --sort=dec |
