Skip to content

Instantly share code, notes, and snippets.

@Fitzsimmons
Created September 9, 2011 20:54
Show Gist options
  • Save Fitzsimmons/1207304 to your computer and use it in GitHub Desktop.
Save Fitzsimmons/1207304 to your computer and use it in GitHub Desktop.
Dev review helper functions
### 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