Skip to content

Commit

Permalink
Add first -> last commits for each author.
Browse files Browse the repository at this point in the history
  • Loading branch information
kidd committed Jan 17, 2017
1 parent 57b9285 commit 7591ddb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions git-quick-stats
Expand Up @@ -36,6 +36,7 @@ function detailedGitStats() {
git log --no-merges --numstat | awk ' git log --no-merges --numstat | awk '
function printStats(author) { function printStats(author) {
printf "%s:\n", 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 " insertions: %d (%.0f%%)\n", more[author], (more[author] / more["total"] * 100)
printf " deletions: %d (%.0f%%)\n", less[author], (less[author] / less["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) printf " files: %d (%.0f%%)\n", file[author], (file[author] / file["total"] * 100)
Expand All @@ -48,6 +49,12 @@ function detailedGitStats() {
commits["total"] += 1 commits["total"] += 1
} }
/^Date:/ {
$1="";
first[author] = substr($0, 2)
if(last[author] == "" ) { last[author] = first[author] }
}
/^[0-9]/ { /^[0-9]/ {
more[author] += $1 more[author] += $1
less[author] += $2 less[author] += $2
Expand Down

0 comments on commit 7591ddb

Please sign in to comment.