Skip to content

Instantly share code, notes, and snippets.

@davidreuss
Created October 24, 2009 00:31
Show Gist options
  • Save davidreuss/217287 to your computer and use it in GitHub Desktop.
Save davidreuss/217287 to your computer and use it in GitHub Desktop.
creates line-based stats by author for a git project
git ls-files | while read f; do git blame -M -- "$f"; done | perl -pe 's/^\^?[a-f0-9]*(?:[^(]* )?\((.*?) +200.*/$1/' | sort | uniq -c | sort -n | tee stats; perl -ne '$s += $1 if /(\d+)/; END{print "$s\n"}' < stats
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment