diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2018-04-27 23:48:16 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-02 01:47:47 +0300 |
commit | d5bc6f292ab0a1715ff021f5854ac5a81c2b88b0 (patch) | |
tree | 02831ad6b2c8f35c3f26bc11a436ba641b0d2103 /t/t3418-rebase-continue.sh | |
parent | 468165c1d8a442994a825f3684528361727cd8c0 (diff) |
rebase -i: demonstrate bugs with fixup!/squash! commit messages
When multiple fixup/squash commands are processed and the last one
causes merge conflicts and is skipped, we leave the "This is a
combination of ..." comments in the commit message.
Noticed by Eric Sunshine.
This regression test also demonstrates that we rely on the localized
version of
# This is a combination of <number> commits
to contain the <number> in ASCII, which breaks under GETTEXT_POISON.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3418-rebase-continue.sh')
-rwxr-xr-x | t/t3418-rebase-continue.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh index 7c91a85f43..69cb079dd1 100755 --- a/t/t3418-rebase-continue.sh +++ b/t/t3418-rebase-continue.sh @@ -88,6 +88,28 @@ test_expect_success 'rebase passes merge strategy options correctly' ' git rebase --continue ' +test_expect_failure '--skip after failed fixup cleans commit message' ' + test_when_finished "test_might_fail git rebase --abort" && + git checkout -b with-conflicting-fixup && + test_commit wants-fixup && + test_commit "fixup! wants-fixup" wants-fixup.t 1 wants-fixup-1 && + test_commit "fixup! wants-fixup" wants-fixup.t 2 wants-fixup-2 && + test_commit "fixup! wants-fixup" wants-fixup.t 3 wants-fixup-3 && + test_must_fail env FAKE_LINES="1 fixup 2 fixup 4" \ + git rebase -i HEAD~4 && + + : now there is a conflict, and comments in the commit message && + git show HEAD >out && + grep "fixup! wants-fixup" out && + + : skip and continue && + git rebase --skip && + + : now the comments in the commit message should have been cleaned up && + git show HEAD >out && + ! grep "fixup! wants-fixup" out +' + test_expect_success 'setup rerere database' ' rm -fr .git/rebase-* && git reset --hard commit-new-file-F3-on-topic-branch && |