Last active
August 29, 2015 14:25
-
-
Save milcktoast/777a8a26c2dda601d151 to your computer and use it in GitHub Desktop.
Author contribution stats (+/-) [with git and awk]
This file contains hidden or 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/sh | |
IFS=$'\n' | |
authors=$(git log --format='%aN' | sort -u) | |
for author in $authors | |
do | |
echo $author | awk 'BEGIN { FS = "\" " }; { printf "%-20s ", $1 }' | |
git log --author="$author" --pretty=tformat: --numstat | | |
awk '{ add += $1; subs += $2; edits += $1 + $2 } END { printf "%10d (+) %10s (-) %10s (+/-) \n", add, subs, edits }' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment