Skip to content

Instantly share code, notes, and snippets.

@pushrax
Created June 12, 2016 19:17
Show Gist options
  • Save pushrax/24c498c19384bdb70e35bb9161b3190a to your computer and use it in GitHub Desktop.
Save pushrax/24c498c19384bdb70e35bb9161b3190a to your computer and use it in GitHub Desktop.
directories="include src"
revs=$(git rev-list --all | awk '{printf "%s\n%s ", $0, $0}' | sed '1d' | sed '$d')
echo "$revs" \
| xargs -n2 -L1 bash -c "git --no-pager diff \$1 \$0 --shortstat -- $directories" \
| awk '{adds+=$4; dels+=$6} END {print adds " insertions"; print dels " deletions"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment