git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Erik Faye-Lund <kusmabite@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [BUG] format-patch does not wrap From-field after author name
Date: Thu, 14 Apr 2011 17:42:30 -0400	[thread overview]
Message-ID: <20110414214230.GB7709@sigill.intra.peff.net> (raw)
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:

> > 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. :)

> > 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

  reply	other threads:[~2011-04-14 21:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-14 17:01 [BUG] format-patch does not wrap From-field after author name Erik Faye-Lund
2011-04-14 17:12 ` Junio C Hamano
2011-04-14 17:50   ` Jeff King
2011-04-14 21:19     ` Erik Faye-Lund
2011-04-14 21:42       ` Jeff King [this message]
2011-04-14 22:18         ` Jeff King
2011-04-14 22:21         ` Erik Faye-Lund
2011-04-14 22:29           ` Jeff King
2011-04-14 22:43             ` Erik Faye-Lund
2011-04-15  3:30               ` Jeff King
2011-04-15  8:32                 ` Erik Faye-Lund
2011-04-16  1:45                   ` Jeff King
2011-04-14 17:52 ` Jeff King
2011-04-14 21:06   ` Erik Faye-Lund
2011-04-14 21:07   ` Erik Faye-Lund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110414214230.GB7709@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=kusmabite@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).