tj.git-extras/bin/git-contrib
go2null a67b42711d FIXes location of -- for grep
Broken in 5b1ac3ccc6

`--` must be after all parameters (options), and before positional arguments

See https://unix.stackexchange.com/questions/11376/what-does-double-dash-mean-also-known-as-bare-double-dash
2015-05-28 11:59:29 +00:00

10 lines
276 B
Bash
Executable file

#!/usr/bin/env bash
user="$*"
test -z "$user" && echo "user name required." 1>&2 && exit 1
count=`git log --oneline --pretty="format: %an" | grep -- "$user" | wc -l`
test $count -eq 0 && echo "$user did not contribute." && exit 1
git shortlog | grep -A $count -- "$user ("