Created
April 26, 2025 21:28
-
-
Save pstef/8c4f3288ec91decf47e6b4d774d89bc5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
BEGIN { | |
FS = OFS = "\t" | |
} | |
$0 == "" { next } | |
NF == 2 { | |
current_author = $1 | |
commits[current_author]++ | |
next | |
} | |
NF == 3 { | |
insertions[current_author] += ($1 + 0) | |
deletions[current_author] += ($2 + 0) | |
files[current_author][$3] = 1 | |
next | |
} | |
{ | |
print "Unexpected line (NR=" NR "): " $0 > "/dev/stderr" | |
current_author = "Unknown" | |
} | |
END { | |
print "Author", "Commits", "UniqueFiles", "Insertions", "Deletions" | |
for (author in commits) | |
print author, commits[author], length(files[author]), insertions[author] + 0, deletions[author] + 0 | |
} |
This file contains hidden or 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 --pretty=format:$'"%aN"\t%H' --numstat --no-merges | awk -f contributions.awk > contributors.tsv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment