Jeff King <peff@xxxxxxxx> writes: > On Wed, Sep 14, 2016 at 10:43:18AM -0700, Junio C Hamano wrote: > >> I think we can go either way and it does not matter all that much if >> "mailinfo" changes its output or the reader of "mailinfo" output >> changes its input--we will either be munging data read from "From:" >> when producing the "Author:" line, or taking the "Author:" output by >> mailinfo and removing the quotes. > > Yeah, that was the part I was wondering about in my original response. > What is the output of mailinfo _supposed_ to be, and do we consider that > at all public (i.e., are there are other tools besides "git am" that > build on mailinfo)? > > At least "am" already does some quote-stripping, so any de-quoting added > in mailinfo is potentially a regression (if we indeed care about keeping > the output stable). Another small thing I am not sure about is if the \ quoting can hide an embedded newline in the author name. Would we end up turning From: "Jeff \ King" <peff@xxxxxxxx> or somesuch into Author: Jeff King Email: peff@xxxxxxxx ;-) > But if we are OK with that, it seems to me that mailinfo is the best > place to do the de-quoting, because then its output is well-defined: > everything after "Author:" up to the newline is the name. There are other things mailinfo does, like turning this From: peff@xxxxxxxx (Jeff King) into Author: Jeff King Email: peff@xxxxxxxx and From: Uh "foo" Bar peff@xxxxxxxx (Jeff King) into Author: Uh "foo" Bar (Jeff King) Email: peff@xxxxxxxx So let's roll the \" -> " into mailinfo. I am not sure if we also should remove the surrounding "", i.e. we currently do not turn this From: "Jeff King" <peff@xxxxxxxx> into this: Author: Jeff King Email: peff@xxxxxxxx I think we probably should, and remove the one that does so from the reader.