Subject: send-email garbled header with trailing doublequote in email

From: Andrea Arcangeli <[email-masked]>
Date: Wed, 2 Nov 2016 21:27:09 +0100

Hello,

send-email gets confused with one trailing " at the end of the
email. Details and how to reproduce below, it breaks also with
upstream git version 2.10.2.dirty.

Feel free to CC me if you need any further info.

Thanks,
Andrea

----- Forwarded message from Andrea Arcangeli <[email-masked]> -----

Date: Wed, 2 Nov 2016 21:07:02 +0100
From: Andrea Arcangeli <[email-masked]>
To: [email-masked]
Subject: Re: [PATCH 00/33] userfaultfd tmpfs/hugetlbfs/non-cooperative
User-Agent: Mutt/1.7.1 (2016-10-04)

FYI: apparently I hit a git bug in this submit... reproducible with
the below command:

git send-email -1 --to '"what ever" <[email-masked]>"'

after replacing [email-masked] with your own email.

*snip*
Dry-OK. Log says:
To: "what ever" " <[email-masked]>
*snip*
X-Mailer: git-send-email 2.7.3

Result: OK

It's not ok if the --dry-run outputs the above with a fine header, but
the actual header in the email data is different. Of course I tested
--dry-run twice and it was fine like the above is fine as well.

*snip*

----- End forwarded message -----