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:38 UTC
Message-ID
<nycvar.QRO.7.76.6.1804202232360.4241@ZVAVAG-6OXH6DA.rhebcr.pbec.zvpebfbsg.pbz>
In-Reply-To
<nycvar.QRO.7.76.6.1804202149260.4241@ZVAVAG-6OXH6DA.rhebcr.pbec.zvpebfbsg.pbz>
Hi Stefan,
On Fri, 20 Apr 2018, Johannes Schindelin wrote:
> A brief test shows, however, that it is not quite as easy as
> s/grep/test_i18ngrep/, something more seems to be broken.
It seems that this week is my Rabbit Hole Week.

Turns out that we have a really, really long-standing bug in our rebase -i where we construct the commit messages for fixup/squash chains.

Background: when having multiple fixup!/squash! commits for the same
original commit, the intermediate commits have messages starting with the
message
	# This is a combination of <N> commits.
and then every fixup/squash command increments that <N> and adds a header
	# This is the commit message #<N>:
before writing the respective commit message.

The problem arises from the fact that we deduce <N> from parsing the first number in ASCII encoding on the first line.

That breaks e.g. when compiling with GETTEXT_POISON, and it is probably not true in general, either.

So I introduced a patch that handles the absence of an ASCII-encoded number gracefully, and now the test passes with and without GETTEXT_POISON.

Thanks for the review that let me find and fix this bug! Dscho

Previous: Johannes SchindelinNext: Stefan Beller
Message 5 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.