diff --git a/git-quick-stats b/git-quick-stats index 97d87fe..4d98ba5 100755 --- a/git-quick-stats +++ b/git-quick-stats @@ -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]