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, 22:29 UTC
Message-ID
<20110414222940.GA19389@sigill.intra.peff.net>
In-Reply-To
<BANLkTikgZH8135=o5ODcA=780-1D7YFngw@mail.gmail.com>
On Fri, Apr 15, 2011 at 12:21:24AM +0200, Erik Faye-Lund wrote:
Show 8 quoted lines
> >> 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.
> >
> 
> Thinking about it a bit more, I'm getting a bit more unsure:
> - The 78-limit is about user-interfaces, not protocol robustness.

True. In theory we should also be limiting to avoid the 998-character hard protocol limit, but that is getting ridiculously unlikely.

> - Since send-email unwraps the line and does not re-wrap it, even if
> we have a name like this it's likely that the work gets undone right
> away.

Not everybody uses send-email. So you are also helping MUAs which consume the output of format-patch.

That being said, I doubt that this will make a difference to anybody. The real reason that we put wrapping into add_rfc2047 was for subjects, which _do_ get long.

> - So that means that send-email should probably also be fixed. But now
> I'm wondering if we've crossed the point where this will just lead to
> less obvious code for very little gain.
It is ugly code.
I'm just as happy if we drop it.
Show 7 quoted lines
> > Because it means we have to _parse_ those
> > headers and understand which part is a name and which is an address.
> 
> That part is surprisingly easy: If it contains a '<', then it's on the form
> "Foo Bar Baz <foo@bar.baz>". If not, it's "foo@bar.baz" (assuming it's
> UTF-8 encoded rfc5322 mailbox'es we assume, which would make the most
> sense to me)
What about:
  "Foo \"The Bar\" Baz" <foo@example.com>
or
  Foo "The Bar" Baz <foo@example.com>
or
  Foo (The Bar) Baz <foo@example.com>

I.e., are we taking rfc822-style addresses, or are we taking something that looks vaguely like an email address, and just treating everything left of "<" as literal?

-Peff
Previous: Erik Faye-LundNext: Erik Faye-Lund
Message 8 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.