Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 27ccd8d

Browse files
j6tgitster
authored andcommitted
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 <[email protected]> Acked-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 042e9f9 commit 27ccd8d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

t/t3404-rebase-interactive.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ test_expect_success '-p handles "no changes" gracefully' '
247247
'
248248

249249
test_expect_failure 'exchange two commits with -p' '
250+
git checkout H &&
250251
FAKE_LINES="2 1" git rebase -i -p HEAD~2 &&
251252
test H = $(git cat-file commit HEAD^ | sed -ne \$p) &&
252253
test G = $(git cat-file commit HEAD | sed -ne \$p)

0 commit comments

Comments
 (0)