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

Re: [BUG] format-patch does not wrap From-field after author name

From
Jeff King <peff@peff.net>
Date
Apr 14, 2011, 21:42 UTC
Message-ID
<20110414214230.GB7709@sigill.intra.peff.net>
In-Reply-To
<BANLkTin+K46_RSDsYWHso3v7Gpe_k+0m8Q@mail.gmail.com>
On Thu, Apr 14, 2011 at 11:19:09PM +0200, Erik Faye-Lund wrote:
Show 7 quoted lines
> > Note that it relies on the commit header having a space before the "<",
> > which forms the continuation whitespace for the header. This is probably
> > reasonable, but we could double-check if we want to handle malformed
> > commit headers better.
> 
> I think that's a reasonable assumption; this field comes straight from
> the commit. It should already be well-formed, no?

Probably; it was just something I noted while writing the patch, and I like to be paranoid about assumptions. :)

Show 7 quoted lines
> > Or we could just ignore it. AFAICS, this doesn't actually violate
> > rfc2047, nor rfc5322. The 78-character limit is simply a SHOULD, and
> > we have up to 998 for MUST. For a single-address header[1], this seems
> > kind of unlikely to me.
> 
> True. But since the fix is as simple as it is, perhaps it's worth it
> just for the clean conscience?
Fair enough. Patch to follow.
> > [1] For multi-address headers like "format-patch --cc=foo --cc=bar", it
> > looks like we already break them across lines.
> 
> Yes, but this is even worse: these fields don't get encoded at all!

Ugh, you're right. That is a totally separate issue, and one I really don't want to get into. Because it means we have to _parse_ those headers and understand which part is a name and which is an address.

People who use "--cc" or format.headers will have to deal with that themselves. I consider both to be somewhat useless, since you can post-process the mbox after format-patch is run (or in your MUA). Whereas quoting and encoding fields in format-patch is necessary to give unambiguous input to the MUA (be it send-email or whatever).

-Peff
Previous: Erik Faye-LundNext: Jeff King
Message 5 of 15 in “[BUG] format-patch does not wrap From-field after author name”
  1. Erik Faye-LundApr 14, 2011
  2. Junio C HamanoApr 14, 2011
  3. Jeff KingApr 14, 2011
  4. Erik Faye-LundApr 14, 2011
  5. Jeff KingApr 14, 2011
  6. Jeff KingApr 14, 2011
  7. Erik Faye-LundApr 14, 2011
  8. Jeff KingApr 14, 2011
  9. Erik Faye-LundApr 14, 2011
  10. Jeff KingApr 15, 2011
  11. Erik Faye-LundApr 15, 2011
  12. Jeff KingApr 16, 2011
  13. Jeff KingApr 14, 2011
  14. Erik Faye-LundApr 14, 2011
  15. Erik Faye-LundApr 14, 2011

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.