From 2c510f21cd2c571549cf75ff94061a2a6717851f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 4 Jan 2016 20:53:30 +0000 Subject: git-send-email: do not double-escape quotes from mutt mutt saves aliases with escaped quotes in the form of: alias dot \"Dot U. Sir\" When we pass through our sanitize_address routine, we end up with double-escaping: To: "\\\"Dot U. Sir\\\" Remove the escaping in mutt only for now, as I am not sure if other mailers can do this or if this is better fixed in sanitize_address. Cc: Remi Lespinet Cc: Matthieu Moy Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- t/t9001-send-email.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 't/t9001-send-email.sh') diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 7be14a4e37..ce94c5a4cb 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh @@ -1521,6 +1521,21 @@ test_expect_success $PREREQ 'cccover adds Cc to all mail' ' test_cover_addresses "Cc" ' +test_expect_success $PREREQ 'escaped quotes in sendemail.aliasfiletype=mutt' ' + clean_fake_sendmail && + echo "alias sbd \\\"Dot U. Sir\\\" " >.mutt && + git config --replace-all sendemail.aliasesfile "$(pwd)/.mutt" && + git config sendemail.aliasfiletype mutt && + git send-email \ + --from="Example " \ + --to=sbd \ + --smtp-server="$(pwd)/fake.sendmail" \ + outdir/0001-*.patch \ + 2>errors >out && + grep "^!somebody@example\.org!$" commandline1 && + grep -F "To: \"Dot U. Sir\" " out +' + test_expect_success $PREREQ 'sendemail.aliasfiletype=mailrc' ' clean_fake_sendmail && echo "alias sbd somebody@example.org" >.mailrc && -- cgit v1.2.1