Last active
December 28, 2015 23:29
-
-
Save stvnwrgs/7579026 to your computer and use it in GitHub Desktop.
Get Information for contributed users of a repo
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
/** | |
* Show inserts and delets by users in a repo | |
* | |
* | |
**/ | |
perl -e 'foreach(`git shortlog -s -n`){'\ | |
'($c,$a)=$_=~/^\s*(\d+)\s*(.+?)\s*$/;$p=$m=0;'\ | |
'foreach(`git log --author="$a" --pretty=tformat: --numstat -C`)'\ | |
'{($pp,$mm)=$_=~/^\s*(\d+)\s+(\d+)/;$p+=$pp;$m+=$mm;}'\ | |
'printf "%5dc %8d+ %8d- %s\n",$c,$p,$m,$a;}' | |
/** | |
* Show inserts and delets by users in a repo after a special date | |
* | |
* | |
**/ | |
perl -e ' | |
$date = "2013-03-20"; | |
printf "____________________\n"; | |
printf "Stats since $date for this git Repo:\n \n"; | |
foreach(`git shortlog -s -n`){'\ | |
'($c,$a)=$_=~/^\s*(\d+)\s*(.+?)\s*$/;$p=$m=0;'\ | |
'foreach(`git log --after={$date} --author="$a" --pretty=tformat: --numstat -C`)'\ | |
'{($pp,$mm)=$_=~/^\s*(\d+)\s+(\d+)/;$p+=$pp;$m+=$mm;}'\ | |
'printf "%5dc %8d+ %8d- %s\n",$c,$p,$m,$a;}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment