Created
June 6, 2013 10:03
-
-
Save netwjx/5720514 to your computer and use it in GitHub Desktop.
统计最近一段时间git版本库中代码提交量
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
git log '@{1 weeks ago}..HEAD' --shortstat --pretty=format:%an | awk '/.+/ { | |
if($2 != "file" && $3 != "changed,") { | |
curr = $1 | |
} else { | |
files[curr]+=$1 | |
inserts[curr]+=$4 | |
deletes[curr]+=$6 | |
} | |
} | |
END { | |
for(i in inserts){ | |
print i ":", "inserts:", inserts[i], "deletes:", deletes[i], "files:", files[i] | |
} | |
}' |
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
张三: inserts: 1225 deletes: 1464 files: 30 | |
李四: inserts: 930 deletes: 687 files: 31 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment