Skip to content

Instantly share code, notes, and snippets.

@davidrapson
davidrapson / commits.sh
Last active August 29, 2015 14:20
List git changes by filetype pattern for an author
#!/bin/sh
author=$1; shift;
patterns=( "$@" );
function get_commits() {
git log --author=$1 --pretty=tformat: --numstat \
| grep $2 \
| awk '{ add += $1; subs += $2; loc += $1 - $2 }
END {