git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/3] rebase -i: demonstrate bug with fixup!/squash! commit messages

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Apr 20, 2018, 20:04 UTC
Message-ID
<nycvar.QRO.7.76.6.1804202149260.4241@ZVAVAG-6OXH6DA.rhebcr.pbec.zvpebfbsg.pbz>
In-Reply-To
<CAGZ79kZONQ_xuDYJ5Z8cUnF0odwz3+Sh+ST6g+5Tefav-QXEBw@mail.gmail.com>
Hi Stefan,
On Fri, 20 Apr 2018, Stefan Beller wrote:
Show 35 quoted lines
> On Fri, Apr 20, 2018 at 5:17 AM, Johannes Schindelin
> <johannes.schindelin@gmx.de> wrote:
> > 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.
> >
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> > ---
> >  t/t3418-rebase-continue.sh | 21 +++++++++++++++++++++
> >  1 file changed, 21 insertions(+)
> >
> > diff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh
> > index 9214d0bb511..b177baee322 100755
> > --- 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' '
> >         git rebase --continue
> >  '
> >
> > +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 &&
> 
> test_i18n_grep ?

Funny thing is: I tested this with GETTEXT_POISON=1, and it succeeded. So I dug deeper why: I never understood that this is a *build* option. I always thought that would be a test-time option... Oh well ;-)

Show 9 quoted lines
> > +
> > +       : skip and continue &&
> > +       git rebase --skip &&
> > +
> > +       : now the comments in the commit message should have been cleaned up &&
> > +       git show HEAD >out &&
> > +       ! grep "This is a combination of" out
> 
> same

Will work on a fix. A brief test shows, however, that it is not quite as easy as s/grep/test_i18ngrep/, something more seems to be broken.

Will keep you posted, Dscho

Previous: Stefan BellerNext: Johannes Schindelin
Message 4 of 15 in “rebase -i: avoid stale "# This is a combination of" in commit messages”
  1. 0/3 rebase -i: avoid stale "# This is a combination of" in commit messagesJohannes Schindelin, Apr 20, 2018
  2. 1/3 rebase -i: demonstrate bug with fixup!/squash! commit messagesJohannes Schindelin, Apr 20, 2018
  3. Stefan BellerApr 20, 2018
  4. Johannes SchindelinApr 20, 2018
  5. Johannes SchindelinApr 20, 2018
  6. Stefan BellerApr 20, 2018
  7. Johannes SchindelinApr 20, 2018
  8. Eric SunshineApr 20, 2018
  9. Eric SunshineApr 20, 2018
  10. Johannes SchindelinApr 20, 2018
  11. 2/3 sequencer: leave a tell-tale when a fixup/squash failedJohannes Schindelin, Apr 20, 2018
  12. Eric SunshineApr 20, 2018
  13. 3/3 rebase --skip: clean up commit message after a failed fixup/squashJohannes Schindelin, Apr 20, 2018
  14. Phillip WoodApr 21, 2018
  15. Johannes SchindelinApr 27, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.