Created
December 2, 2012 18:41
-
-
Save kswedberg/4190376 to your computer and use it in GitHub Desktop.
commit pull request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cipreq() { | |
if [ -z "$1" ] | |
then | |
echo `git log -1 --no-merges --pretty=format:'git commit -a --author="'"%an <%aE>"'" --message="'"%s %b"'"'` | |
return 1 | |
fi | |
AUTHOR=$1 | |
if [ -z "$2" ] | |
then | |
MSG="" | |
else | |
MSG="--grep=${2}" | |
fi | |
echo `git log -1 ${MSG} --author="${AUTHOR}" --no-merges --pretty=format:'git commit -a --author="'"%an <%aE>"'" --message="'"%s %b"'"'` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the author committed again after sending the pull request and that other commit was merged in, you can specify a distinctive word within the commit message that you're targeting. It would look like this:
cipreq Karl somethingFromCommit
This is starting to feel hackish. I wish I knew how to do command-line arguments of the
--
variety so we could do something likecipreq --author=Karl --msg=somethingFromCommit