Last active
May 2, 2023 19:47
-
-
Save jkoop/f452c854051d89d80903b921f53f6a36 to your computer and use it in GitHub Desktop.
Who gets blamed for the most lines in a git project?
This file contains 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
#! /bin/sh | |
git ls-files -z | \ | |
xargs -0n1 git blame -w | \ | |
grep -o --binary-files=text '^[^(]*([^)]*)' | \ | |
grep -o '([^0-9]*' | \ | |
grep -o '[^(]*' | \ | |
sed 's/\s*$//g' | \ | |
sort -f | \ | |
uniq -c | \ | |
sort -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment