Created
September 9, 2011 20:54
-
-
Save Fitzsimmons/1207304 to your computer and use it in GitHub Desktop.
Dev review helper functions
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
### ZSH | |
### Add one of these to your .zshrc | |
# Outputs a github link that you can click on to see the diff | |
devreview() { | |
if [[ -n $1 ]]; then | |
git log --pretty=oneline | egrep "Merge branch '${1}.*' into (dev|release|rails_3)" | awk '{print "https://github.com/nulogy/packmanager/commit/" $1}' | |
fi | |
} | |
# Outputs the diff right in the console. | |
devreview() { | |
if [[ -n $1 ]]; then | |
git log -m -p -1 `git log --pretty=oneline | egrep "Merge branch '${1}.*' into (dev|release|rails_3)" | awk '{print $1}'` | |
fi | |
} | |
### BASH | |
# Outputs a github link that you can click on to see the diff | |
function devreview { | |
if [[ -n $1 ]]; then | |
git log --pretty=oneline | egrep "Merge branch '${1}.*' into (dev|release|rails_3)" | awk '{print "https://github.com/nulogy/packmanager/commit/" $1}' | |
fi | |
} | |
# Outputs the diff right in the console. | |
function devreview { | |
if [[ -n $1 ]]; then | |
git log -m -p -1 `git log --pretty=oneline | egrep "Merge branch '${1}.*' into (dev|release|rails_3)" | awk '{print $1}'` | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment