Re: [RFC/PATCH] mailinfo: do not treat ">From" lines as in-body headers

2014-09-16 Thread Jeff King
On Tue, Sep 16, 2014 at 11:41:08AM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > >> I think you forgot to "git add" mbox.h. That being said, if we did go > >> this route, I do not see any reason to share the code at all. This can > >> be purely a mailinfo.c thing. > > > > OK. A rero

Re: [RFC/PATCH] mailinfo: do not treat ">From" lines as in-body headers

2014-09-16 Thread Junio C Hamano
Junio C Hamano writes: >> I think you forgot to "git add" mbox.h. That being said, if we did go >> this route, I do not see any reason to share the code at all. This can >> be purely a mailinfo.c thing. > > OK. A reroll coming today when I find time. -- >8 -- From: Jeff King Date: Sat, 13 Sep

Re: [RFC/PATCH] mailinfo: do not treat ">From" lines as in-body headers

2014-09-16 Thread Junio C Hamano
Jeff King writes: > The only cases that I can think of that would be a problem with this > strictness are: > > 1. Somebody writes format-patch output to a file, reads in the mbox > using another program, and then writes out the result (munging the > mbox From line). And then pastes th

Re: [RFC/PATCH] mailinfo: do not treat ">From" lines as in-body headers

2014-09-15 Thread Jeff King
On Mon, Sep 15, 2014 at 01:15:35PM -0700, Junio C Hamano wrote: > > If we only want to skip ">?From" in pasted format-patch output, we > > would want a rule in mailinfo that is tighter than is_from_line() in > > mailsplit. > > That is, something like this on top of your patch. Or is this a bit >

Re: [RFC/PATCH] mailinfo: do not treat ">From" lines as in-body headers

2014-09-15 Thread Jeff King
On Mon, Sep 15, 2014 at 11:56:16AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > It looks like we have a reasonably sane is_from_line() function. So at > > least _we_ will not generally break on reading our own output, except in > > some extreme circumstances (you'd have to come up with

Re: [RFC/PATCH] mailinfo: do not treat ">From" lines as in-body headers

2014-09-15 Thread Junio C Hamano
Junio C Hamano writes: > Why cache.h when this is still only between mail{info,split}.c both > of which do not really deal with any "Git" data? > > For mailsplit, we are trying to detect mbox boundary various MUAs > would use in their output, and is_from_line() may be appropriate, > but I am not

Re: [RFC/PATCH] mailinfo: do not treat ">From" lines as in-body headers

2014-09-15 Thread Junio C Hamano
Jeff King writes: > It looks like we have a reasonably sane is_from_line() function. So at > least _we_ will not generally break on reading our own output, except in > some extreme circumstances (you'd have to come up with something > contrived like "From me, at 10:30 30 minutes before 11!"). > >

Re: [RFC/PATCH] mailinfo: do not treat ">From" lines as in-body headers

2014-09-15 Thread Junio C Hamano
Jeff King writes: > On Sat, Sep 13, 2014 at 05:55:49PM -0700, Junio C Hamano wrote: > >> On Sat, Sep 13, 2014 at 5:47 PM, Jeff King wrote: >> > >> > On Sat, Sep 13, 2014 at 10:57:14PM +, brian m. carlson wrote: >> > >> > > I wonder if git send-email should do what mutt does in this case, whi

Re: [RFC/PATCH] mailinfo: do not treat ">From" lines as in-body headers

2014-09-13 Thread Jeff King
On Sat, Sep 13, 2014 at 09:01:20PM -0400, Jeff King wrote: > [1] We do use the mbox format in git, and AFAIK do not do any > From-quoting of this nature. I haven't tested, but I suspect that > certain format-patch output would be corrupted when reading back via > "git am", let alone o

Re: [RFC/PATCH] mailinfo: do not treat ">From" lines as in-body headers

2014-09-13 Thread Jeff King
On Sat, Sep 13, 2014 at 05:55:49PM -0700, Junio C Hamano wrote: > On Sat, Sep 13, 2014 at 5:47 PM, Jeff King wrote: > > > > On Sat, Sep 13, 2014 at 10:57:14PM +, brian m. carlson wrote: > > > > > I wonder if git send-email should do what mutt does in this case, which > > > is use quoted-print

Re: [RFC/PATCH] mailinfo: do not treat ">From" lines as in-body headers

2014-09-13 Thread Junio C Hamano
On Sat, Sep 13, 2014 at 5:47 PM, Jeff King wrote: > > On Sat, Sep 13, 2014 at 10:57:14PM +, brian m. carlson wrote: > > > I wonder if git send-email should do what mutt does in this case, which > > is use quoted-printable encoding and encode the first F as =46 (as well > > as any equals signs

Re: [RFC/PATCH] mailinfo: do not treat ">From" lines as in-body headers

2014-09-13 Thread Jeff King
On Sat, Sep 13, 2014 at 10:57:14PM +, brian m. carlson wrote: > On Sat, Sep 13, 2014 at 05:25:05PM -0400, Jeff King wrote: > > Thanks both of you for following up. I did confirm that git-send-email > > does not add such quoting. From your findings above, I'd agree that it's > > the list-archiv

Re: [RFC/PATCH] mailinfo: do not treat ">From" lines as in-body headers

2014-09-13 Thread brian m. carlson
On Sat, Sep 13, 2014 at 05:25:05PM -0400, Jeff King wrote: > Thanks both of you for following up. I did confirm that git-send-email > does not add such quoting. From your findings above, I'd agree that it's > the list-archive software munging it, and they are buggy IMHO (they > should de-quote on d

[RFC/PATCH] mailinfo: do not treat ">From" lines as in-body headers

2014-09-13 Thread Jeff King
[-cc driver-devel list, as this is getting into git patches] On Sun, Sep 14, 2014 at 12:09:08AM +0300, Dan Carpenter wrote: > > > FYI it was 'git send-email' v2.1.0 that sent the mail, and I don't have > > > the offending character in any versions of the mail I can see. > [...] > Piper mail has '