Re: [PATCH] mailinfo: unescape quoted-pair in header fields

2016-09-21 Thread Junio C Hamano
Jeff King writes: > So if that's the case, do we actually need to care if we see any > parenthesized comments? I think we should just leave comments in place > either way, so syntactically they are only interesting insofar as we > replace quoted pairs or not. > > IOW, I wonder if: > > while ((c

Re: [PATCH] mailinfo: unescape quoted-pair in header fields

2016-09-19 Thread Jeff King
On Mon, Sep 19, 2016 at 12:51:33PM +0200, Kevin Daudt wrote: > > I didn't look in the RFC. Is: > > > > From: my \"name\" > > > > really the same as: > > > > From: "my \\\"name\\\"" > > > > ? That seems weird, but I think it may be that the former is simply > > bogus (you are not supposed

Re: [PATCH] mailinfo: unescape quoted-pair in header fields

2016-09-19 Thread Kevin Daudt
Thanks for the review On Fri, Sep 16, 2016 at 03:22:06PM -0700, Jeff King wrote: > On Fri, Sep 16, 2016 at 11:02:04PM +0200, Kevin Daudt wrote: > > > mailinfo.c | 54 > > ++ > > t/t5100-mailinfo.sh| 6 ++ > > t/t5100/quote

Re: [PATCH] mailinfo: unescape quoted-pair in header fields

2016-09-16 Thread Jeff King
On Fri, Sep 16, 2016 at 11:02:04PM +0200, Kevin Daudt wrote: > rfc2822 has provisions for quoted strings in structured header fields, > but also allows for escaping these with so-called quoted-pairs. > > The only thing git currently does is removing exterior quotes, but > quotes within are left a