Skip to content

Instantly share code, notes, and snippets.

@vins31
Created April 3, 2014 09:21
Show Gist options
  • Save vins31/9951240 to your computer and use it in GitHub Desktop.
Save vins31/9951240 to your computer and use it in GitHub Desktop.
# Note 1: change the grep cpp to filter an other extension
# Note 2: only "total lines" is relevant.
IFS=$'\n'; for ppl in $(git log --format='%aN' | sort -u); do echo $ppl; git log --author="$ppl" --pretty=tformat: --numstat | grep cpp | gawk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END { printf "added lines: %s removed lines: %s total lines: %s\n",add,subs,loc }'; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment