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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 14, 2011 at 11:42 PM, Jeff King <peff@xxxxxxxx> wrote:
> On Thu, Apr 14, 2011 at 11:19:09PM +0200, Erik Faye-Lund wrote:
>> > 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.
>

Thinking about it a bit more, I'm getting a bit more unsure:
- The 78-limit is about user-interfaces, not protocol robustness.
- 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.
- 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.

So I think I might have over-though this.

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

Indeed. I have an itch around this area (I've been playing with
porting send-email to C), so I might look at it at some point soon.

> 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@xxxxxxx>". If not, it's "foo@xxxxxxx" (assuming it's
UTF-8 encoded rfc5322 mailbox'es we assume, which would make the most
sense to me)

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

I agree. I'm actually a tad surprised we support it in the first place.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]