Skip to content

Commit

Permalink
t3404: Add test case for aborted --continue after "edit"
Browse files Browse the repository at this point in the history
Add a test case for the bugfix introduced by commit 8beb1f3
"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>
  • Loading branch information
Stephan Beyer authored and Junio C Hamano committed Jan 15, 2009
1 parent 944019c commit dc7f55c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions t/t3404-rebase-interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,21 @@ test_expect_success '--continue tries to commit, even for "edit"' '
test $parent = $(git rev-parse HEAD^)
'

test_expect_success 'aborted --continue does not squash commits after "edit"' '
old=$(git rev-parse HEAD) &&
test_tick &&
FAKE_LINES="edit 1" git rebase -i HEAD^ &&
echo "edited again" > file7 &&
git add file7 &&
(
FAKE_COMMIT_MESSAGE=" " &&
export FAKE_COMMIT_MESSAGE &&
test_must_fail git rebase --continue
) &&
test $old = $(git rev-parse HEAD) &&
git rebase --abort
'

test_expect_success 'rebase a detached HEAD' '
grandparent=$(git rev-parse HEAD~2) &&
git checkout $(git rev-parse HEAD) &&
Expand Down

0 comments on commit dc7f55c

Please sign in to comment.