Re: [PATCH 1/3] rebase -i: demonstrate bug with fixup!/squash! commit messages
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Apr 20, 2018, 19:29 UTC
- Message-ID
- <CAPig+cSb33EG2nATjCem4-2dp87SKOXm_SCWU=fCXJCBRZzgeg@mail.gmail.com>
- In-Reply-To
- <ad2a1b2c60341d692e94b1cb997df05dd7cded88.1524226637.git.johannes.schindelin@gmx.de>
On Fri, Apr 20, 2018 at 8:17 AM, Johannes Schindelin <johannes.schindelin@gmx.de> wrote:
Show 23 quoted lines
> 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. > > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> > --- > diff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh > @@ -88,6 +88,27 @@ test_expect_success 'rebase passes merge strategy options correctly' ' > +test_expect_failure '--continue after failed fixup cleans commit message' ' > + 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 "This is a combination of" out && > + > + : skip and continue && > + git rebase --skip &&
I see that this test script doesn't utilize it, but do you want a
test_when_finished "reset_rebase" &&
before starting the rebase to clean up in case something before "git rebase --skip" fails?
> + : now the comments in the commit message should have been cleaned up && > + git show HEAD >out && > + ! grep "This is a combination of" out > +'