Merge pull request #18 from arzzen/awk-division-by-zero

awk division by zero #16
This commit is contained in:
Lukáš Mešťan 2017-01-22 15:57:24 +01:00 committed by GitHub
commit 7998ec0f34

View file

@ -46,7 +46,10 @@ function detailedGitStats() {
printf "\t insertions: %d (%.0f%%)\n", more[author], (more[author] / more["total"] * 100)
printf "\t deletions: %d (%.0f%%)\n", less[author], (less[author] / less["total"] * 100)
printf "\t files: %d (%.0f%%)\n", file[author], (file[author] / file["total"] * 100)
printf "\t commits: %d (%.0f%%)\n", commits[author], (commits[author] / commits["total"] * 100)
if(commits["total"] > 0) {
printf "\t commits: %d (%.0f%%)\n", commits[author], (commits[author] / commits["total"] * 100)
}
if ( first[author] != "" ) {
printf "\t first commit: %s\n", first[author]