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

Obscure commit message formatting issue

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Nov 11, 2007, 21:28 UTC
Message-ID
<Pine.LNX.4.64.0711111559220.29952@iabervon.org>

The current code drops extra blank lines between the first line of a commit message (the summary line) and the remainder. That is:

This is the summary
This is another bit
This is a third bit
turns into:
Subject: This is the summary
Other-Headers:
This is another bit
This is a third bit

This is an issue if you want to generate an email whose body starts with a blank line, and I assume (although I haven't tried), that rebase would lose a blank line out of commits formatted like that. We don't seem to have any tests that require that line to get suppressed, and we also don't suppress any other blank lines. Is there some reason to do it?

I'd guess that the "first" handling in pp_remainder() was intended to skip the blank line between the summary line and the body, but that line has already been consumed by other code.

	-Daniel
*This .sig left intentionally blank*
Next: Junio C Hamano
Message 1 of 5 in “Obscure commit message formatting issue”
  1. Daniel BarkalowNov 11, 2007
  2. Junio C HamanoNov 11, 2007
  3. Daniel BarkalowNov 11, 2007
  4. Johannes SchindelinNov 11, 2007
  5. Daniel BarkalowNov 11, 2007

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.