-
-
Save clairvy/7982957 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
# Copyright (c), Naruse Motoki ([email protected]) | |
# Licensed under The MIT License | |
dryrun=`git push -n 2>&1` | |
echo "$dryrun" | |
fromto=`echo $dryrun | sed -e "s/.* \([0-9a-z]\+\.\.[0-9a-z]\+\) .*/\1/g"` | |
if expr "$fromto" : "^[0-9a-z]\+\.\.[0-9a-z]\+$" >/dev/null; then | |
echo "`git log --date=short --pretty=format:"%h %ad %an %s" $fromto`" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment