rebase -i: fix for optional [branch] parameter
When calling "git rebase -i <upstream> <branch>", git should switch to <branch> first. This worked before, but I broke it by my "Shut git rebase -i up" patch. Fix that, and add a test to make sure that it does not break again. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Acked-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
434e6ef89d
commit
c9e6589288
@ -405,6 +405,7 @@ do
|
||||
|
||||
require_clean_work_tree
|
||||
|
||||
mkdir "$DOTEST" || die "Could not create temporary $DOTEST"
|
||||
if test ! -z "$2"
|
||||
then
|
||||
output git show-ref --verify --quiet "refs/heads/$2" ||
|
||||
@ -418,7 +419,6 @@ do
|
||||
|
||||
test -z "$ONTO" && ONTO=$UPSTREAM
|
||||
|
||||
mkdir "$DOTEST" || die "Could not create temporary $DOTEST"
|
||||
: > "$DOTEST"/interactive || die "Could not mark as interactive"
|
||||
git symbolic-ref HEAD > "$DOTEST"/head-name ||
|
||||
die "Could not get HEAD"
|
||||
|
Reference in New Issue
Block a user