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

Re: [PATCH] sequencer: require trailing NL in footers

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Apr 25, 2017, 22:05 UTC
Message-ID
<alpine.DEB.2.20.1704260003570.3480@virtualbox>
In-Reply-To
<CAGZ79kbhxjO-tFW4_kObTZiauetjsgY1NBSKvo1NV5nKNEy2xA@mail.gmail.com>
Hi Stefan,
On Tue, 25 Apr 2017, Stefan Beller wrote:
Show 17 quoted lines
> On Tue, Apr 25, 2017 at 2:51 PM, Jonathan Tan <jonathantanmy@google.com> wrote:
> > On 04/25/2017 02:04 PM, Stefan Beller wrote:
> >>
> >> Thanks for the fix. :)
> >> Do we want to test for this use case in the future?
> >
> >
> > Thanks!
> >
> > I'm not sure of the value of including a test for this specific use case,
> > because Git normally does not create commit messages with no trailing
> > newlines. (To test this, I suspect I would need to use hash-object with a
> > specifically crafted commit object.)
> 
> Okay, makes sense to omit a test.
> In that case: Is it needed to hint at how this bug occurred in the wild?
> (A different Git implementation, which may be fixed now?)

Just because Git usually does not create commit messages without trailing newlines does not mean that it is a rare thing. We got bug reports about this, so I think it is frequent enough that we could save time by adding that test and avoid future bug reports/bug hunts.

Ciao, Johannes

Previous: Stefan BellerNext: Jonathan Nieder
Message 8 of 18 in “[GIT 2.12.2 REGRESSION] git cherry-pick -x”
  1. Brian NorrisApr 21, 2017
  2. Stefan BellerApr 21, 2017
  3. Jeff KingApr 21, 2017
  4. sequencer: require trailing NL in footersJonathan Tan, Apr 25, 2017
  5. Stefan BellerApr 25, 2017
  6. Jonathan TanApr 25, 2017
  7. Stefan BellerApr 25, 2017
  8. Johannes SchindelinApr 25, 2017
  9. Jonathan NiederApr 25, 2017
  10. Brian NorrisApr 25, 2017
  11. Brian NorrisApr 26, 2017
  12. Johannes SchindelinApr 25, 2017
  13. Jonathan NiederApr 25, 2017
  14. sequencer: require trailing NL in footersJonathan Tan, Apr 25, 2017
  15. Jonathan NiederApr 26, 2017
  16. Junio C HamanoApr 26, 2017
  17. Johannes SchindelinApr 26, 2017
  18. sequencer: add newline before adding footersJonathan Tan, Apr 26, 2017

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.