summaryrefslogtreecommitdiff
path: root/t/t3404-rebase-interactive.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-08-01 23:31:03 +0100
committerJunio C Hamano <gitster@pobox.com>2007-08-01 18:17:56 -0700
commitc9e6589288b09f4e631c7f12f0f9a77c29851632 (patch)
tree1c4d1aa4483d4e619b2e0eea7c38660b938fbce9 /t/t3404-rebase-interactive.sh
parent434e6ef89d73dcc812b3a44dfaff0ca8204a206e (diff)
downloadgit-c9e6589288b09f4e631c7f12f0f9a77c29851632.tar.gz
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>
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-xt/t3404-rebase-interactive.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index dc436d768e..a9b552ff08 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -98,6 +98,14 @@ test_expect_success 'no changes are a nop' '
test $(git rev-parse I) = $(git rev-parse HEAD)
'
+test_expect_success 'test the [branch] option' '
+ git checkout -b dead-end &&
+ git rm file6 &&
+ git commit -m "stop here" &&
+ git rebase -i F branch2 &&
+ test $(git rev-parse I) = $(git rev-parse HEAD)
+'
+
test_expect_success 'rebase on top of a non-conflicting commit' '
git checkout branch1 &&
git tag original-branch1 &&