@matheusbsbs / matheus-bagliano / commits / dc7f55cbe9
Fork 0

t3404: Add test case for aborted --continue after "edit"

Add a test case for the bugfix introduced by commit 8beb1f33d "git-rebase-interactive: do not squash commits on abort". Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stephan Beyer committed Jan 15, 2009 at 13:56 UTC dc7f55cbe9a544ba7af981c00c52efb2d0283a8f
1 file changed +15
t/t3404-rebase-interactive.sh
+15
@@ -373,6 +373,21 @@ test_expect_success '--continue tries to commit, even for "edit"' '
373 test $parent = $(git rev-parse HEAD^)
374 '
375
376 +test_expect_success 'aborted --continue does not squash commits after "edit"' '
377 + old=$(git rev-parse HEAD) &&
378 + test_tick &&
379 + FAKE_LINES="edit 1" git rebase -i HEAD^ &&
380 + echo "edited again" > file7 &&
381 + git add file7 &&
382 + (
383 + FAKE_COMMIT_MESSAGE=" " &&
384 + export FAKE_COMMIT_MESSAGE &&
385 + test_must_fail git rebase --continue
386 + ) &&
387 + test $old = $(git rev-parse HEAD) &&
388 + git rebase --abort
389 +'
390 +
391 test_expect_success 'rebase a detached HEAD' '
392 grandparent=$(git rev-parse HEAD~2) &&
393 git checkout $(git rev-parse HEAD) &&