Created
February 28, 2012 18:31
-
-
Save pbjorklund/1934174 to your computer and use it in GitHub Desktop.
Sorted git blame on repo
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
| # From http://stackoverflow.com/questions/4589731/git-blame-statistics | |
| # Performs a git blame on the repo and sorts the results | |
| git ls-tree -r HEAD | gsed -re 's/^.{53}//' | \ | |
| while read filename; do file "$filename"; done | \ | |
| grep -E ': .*text' | gsed -r -e 's/: .*//' | \ | |
| while read filename; do git blame "$filename"; done | \ | |
| ruby -ne 'puts $1.strip if $_ =~ /^\w{8} \((.*?)\s*\d{4}-\d{2}-\d{2}/' | \ | |
| sort | uniq -c | sort -rg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment