Skip to content

Instantly share code, notes, and snippets.

@rwaldron
Forked from kswedberg/cipreq.bash
Created December 3, 2012 21:36
Show Gist options
  • Save rwaldron/4198309 to your computer and use it in GitHub Desktop.
Save rwaldron/4198309 to your computer and use it in GitHub Desktop.
commit pull request
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