Skip to content

Instantly share code, notes, and snippets.

@richo
Created January 4, 2013 00:13
Show Gist options
  • Save richo/4448732 to your computer and use it in GitHub Desktop.
Save richo/4448732 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Get a list of authors
authors=""
git shortlog -s | cut -c8- | while read author; do
add=0
del=0
git log $@ --author="$author" --pretty=tformat: --numstat | while read added removed file; do
if echo "$file" | grep -v vendor && [ -n "$added" ] && [ -n "$removed" ] && [ "$added" != "-" ]; then
add=$(( $add + $added ))
del=$(( $del + $removed ))
fi
echo "$author added $add and removed $del"
done | tail -n 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment