aboutsummaryrefslogtreecommitdiff
path: root/t/t3404-rebase-interactive.sh
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2012-05-19 15:14:16 +0200
committerJunio C Hamano <gitster@pobox.com>2012-05-20 14:54:07 -0700
commit27ccd8d1a3ccb539d1d97302e1f500b6d20eb781 (patch)
treedb6748e4d322c73188eb49122112cabc4e11009b /t/t3404-rebase-interactive.sh
parent042e9f94a71977b471e230f0c637699b0a7ca3d3 (diff)
downloadgit-27ccd8d1a3ccb539d1d97302e1f500b6d20eb781.tar.gz
git-27ccd8d1a3ccb539d1d97302e1f500b6d20eb781.tar.xz
t3404: begin "exchange commits with -p" test with correct preconditions
The test case shows a bug in 'rebase -p', but even if the bug were fixed the test would fail because it did not ensure that the preconditions match the postconditions that were checked. Insert the suitable 'git checkout'. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Acked-by: Jonathan Nieder <jrnieder@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.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 7fd212762..eab8501e1 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -247,6 +247,7 @@ test_expect_success '-p handles "no changes" gracefully' '
'
test_expect_failure 'exchange two commits with -p' '
+ git checkout H &&
FAKE_LINES="2 1" git rebase -i -p HEAD~2 &&
test H = $(git cat-file commit HEAD^ | sed -ne \$p) &&
test G = $(git cat-file commit HEAD | sed -ne \$p)