t3404: Add test case for auto-amending only edited commits after "edit"
Add a test case for the bugfix introduced by commit c14c3c82d
"git-rebase--interactive: auto amend only edited commit".
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
parent
dc7f55cbe9
commit
f8aa1b6902
|
@ -388,6 +388,23 @@ test_expect_success 'aborted --continue does not squash commits after "edit"' '
|
||||||
git rebase --abort
|
git rebase --abort
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'auto-amend only edited commits after "edit"' '
|
||||||
|
test_tick &&
|
||||||
|
FAKE_LINES="edit 1" git rebase -i HEAD^ &&
|
||||||
|
echo "edited again" > file7 &&
|
||||||
|
git add file7 &&
|
||||||
|
FAKE_COMMIT_MESSAGE="edited file7 again" git commit &&
|
||||||
|
echo "and again" > file7 &&
|
||||||
|
git add file7 &&
|
||||||
|
test_tick &&
|
||||||
|
(
|
||||||
|
FAKE_COMMIT_MESSAGE="and again" &&
|
||||||
|
export FAKE_COMMIT_MESSAGE &&
|
||||||
|
test_must_fail git rebase --continue
|
||||||
|
) &&
|
||||||
|
git rebase --abort
|
||||||
|
'
|
||||||
|
|
||||||
test_expect_success 'rebase a detached HEAD' '
|
test_expect_success 'rebase a detached HEAD' '
|
||||||
grandparent=$(git rev-parse HEAD~2) &&
|
grandparent=$(git rev-parse HEAD~2) &&
|
||||||
git checkout $(git rev-parse HEAD) &&
|
git checkout $(git rev-parse HEAD) &&
|
||||||
|
|
Loading…
Reference in New Issue