Created
August 28, 2012 12:03
-
-
Save victor/3497546 to your computer and use it in GitHub Desktop.
If you use gerrit for code review, this script may come in handy. Substitute your repository name adequately
This file contains hidden or 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 | |
PATCH=$1 | |
PATCHSET=$2 | |
URL=ssh://username@server:29418/repository | |
if [ -z "$PATCHSET" ]; then | |
PATCHSET=1 | |
fi | |
git fetch ${URL} refs/changes/${PATCH:2}/${PATCH}/${PATCHSET} && git checkout -B "${PATCH}#${PATCHSET}" FETCH_HEAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice. No more copy paste from Gerrit!