From: Jeff King Date: Tue, 13 Sep 2016 15:26:23 GMT Subject: Re: git-am includes escape characters from 'From' field Message-ID: <20160913152622.2xtyn6mki6p6afsg@sigill.intra.peff.net> In-Reply-To: On Mon, Sep 12, 2016 at 10:10:23PM +0200, Swift Geek wrote: > git-am seems to add backslash that escapes double quote character, example > git format-patch > > From 63da989a5295214f9bd06cd7b409a86a65241eea Mon Sep 17 00:00:00 2001 > From: "Sebastian \"Swift Geek\" Grzywna" This looks correct; the output of format-patch is an rfc2822 message, and it requires this quoting. The part you don't show, and that I think is wrong, is that if you then "git am" this patch, it pulls the backslashes into the commit object. The culprit looks like "parse_mail()" in builtin/am.c (or possibly mailinfo() that it calls), which blindly picks up the name portion without doing any rfc2822 de-quoting. I don't think we have any existing de-quoting routines to plug in, so fixing it would probably start with writing one. -Peff