rud (owner)

Revisions

gist: 175421 Download_button fork
public
Description:
Git: reviewed revisions
Public Clone URL: git://gist.github.com/175421.git
Embed All Files: show embed
reviewed.sh #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh -x
NEW_BASE=${1?"Usage: $0 <newbase>"}
 
CURRENT=`git branch | grep '\*' | awk '{print $2}'`
 
git checkout reviewed || git checkout -b reviewed ${NEW_BASE} || exit 1
git rebase ${NEW_BASE} || exit 1
git checkout ${CURRENT}
 
 
# Assumption: you have a branch named 'reviewed' which is used to track the latest reviewed revision.
# If the branch 'reviewed' does not exist, it will be automatically created.
#
# Invocation:
# ./reviewed.sh 369b5cc
#
# This will change reviewed to point to the revision 369b5cc.
#
# If you make commits to the 'reviewed' branch, these are kept when marking a new revision as reviewed.