Merge pull request #8 from kidd/first-last-commits

Add first -> last commits for each author.
This commit is contained in:
Lukáš Mešťan 2017-01-17 15:32:13 +01:00 committed by GitHub
commit afa91dff42

View file

@ -36,6 +36,7 @@ function detailedGitStats() {
git log --no-merges --numstat | awk '
function printStats(author) {
printf "%s:\n", author
printf " first -> last: %s -> %s \n", first[author] , last[author]
printf " insertions: %d (%.0f%%)\n", more[author], (more[author] / more["total"] * 100)
printf " deletions: %d (%.0f%%)\n", less[author], (less[author] / less["total"] * 100)
printf " files: %d (%.0f%%)\n", file[author], (file[author] / file["total"] * 100)
@ -48,6 +49,12 @@ function detailedGitStats() {
commits["total"] += 1
}
/^Date:/ {
$1="";
first[author] = substr($0, 2)
if(last[author] == "" ) { last[author] = first[author] }
}
/^[0-9]/ {
more[author] += $1
less[author] += $2