Last active
December 20, 2017 10:59
-
-
Save daniele-xp/abbeb4955324ee3560825975ca2c9327 to your computer and use it in GitHub Desktop.
Git log script for TR in Phoenix and MobilePOS code reviews
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/bash | |
LOG_START_DATE="2016-01-01" | |
function log(){ | |
cardNumber=$1 | |
options="" | |
if [ "x$2" = "xdiff" ] ; then | |
options="$options --stat -p" | |
if [ "x$3" = "xspaces" ] ; then | |
options="$options -w --color-words" | |
fi | |
else | |
options="$options --oneline" | |
fi | |
git log --reverse --grep "\[$cardNumber\]" --after=$LOG_START_DATE $options | |
} | |
echo "git log starting from $LOG_START_DATE" | |
if test $1; then | |
log $1 $2 $3 | |
else | |
git log --oneline --after=$LOG_START_DATE | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment