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>
Johannes Sixt committed
May 19, 2012 at 15:14 UTC
27ccd8d1a3ccb539d1d97302e1f500b6d20eb781
1 file changed
+1
t/t3404-rebase-interactive.sh
+1
@@ -247,6 +247,7 @@ test_expect_success '-p handles "no changes" gracefully' '
247
'
248
249
test_expect_failure 'exchange two commits with -p' '
250
+ git checkout H &&
251
FAKE_LINES="2 1" git rebase -i -p HEAD~2 &&
252
test H = $(git cat-file commit HEAD^ | sed -ne \$p) &&
253
test G = $(git cat-file commit HEAD | sed -ne \$p)