mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
For example "visionmedia" might be in a submodule commit, so grep fucks up and does not show the contrib properly. The down side of this is that you need to specify the entire user name
10 lines
274 B
Bash
Executable file
10 lines
274 B
Bash
Executable file
#!/bin/sh
|
|
|
|
user="$1"
|
|
if test -z "$user"; then
|
|
echo "user name required." && exit 1
|
|
else
|
|
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 "$user (" -A $count
|
|
fi |