Only end a branch if its rebase is complete.
[socialgit.git] / endbranch
blob410cb21071f19e48befe0f1dbd0f94cada64f540
1 #!/bin/sh
2 # endbranch
4 CURBRANCH=`currentbranchname`
5 if ( rebasebranch|grep "Rebasing complete." ); then
6 git checkout master
7 git merge $CURBRANCH
8 git branch -d $CURBRANCH
9 else
10 rebasebranch $CURBRANCH