summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-02-05 14:54:09 -0800
committerJunio C Hamano <gitster@pobox.com>2016-02-05 14:54:09 -0800
commit25b1166ab2d4cb1685ecc26a36c35756ed5e1d4d (patch)
tree1aff8e0be48964bf844c0115b775436e1b36e4b5 /git-send-email.perl
parentaf3e464a60d43ebf0431aa291014d32983a502e2 (diff)
parent2c510f21cd2c571549cf75ff94061a2a6717851f (diff)
downloadgit-25b1166ab2d4cb1685ecc26a36c35756ed5e1d4d.tar.gz
Merge branch 'ew/send-email-mutt-alias-fix' into maint
"git send-email" was confused by escaped quotes stored in the alias files saved by "mutt", which has been corrected. * ew/send-email-mutt-alias-fix: git-send-email: do not double-escape quotes from mutt
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl9
1 files changed, 7 insertions, 2 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 6caa5b563f..d356901348 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -524,8 +524,13 @@ my %parse_alias = (
if (/^\s*alias\s+(?:-group\s+\S+\s+)*(\S+)\s+(.*)$/) {
my ($alias, $addr) = ($1, $2);
$addr =~ s/#.*$//; # mutt allows # comments
- # commas delimit multiple addresses
- $aliases{$alias} = [ split_addrs($addr) ];
+ # commas delimit multiple addresses
+ my @addr = split_addrs($addr);
+
+ # quotes may be escaped in the file,
+ # unescape them so we do not double-escape them later.
+ s/\\"/"/g foreach @addr;
+ $aliases{$alias} = \@addr
}}},
mailrc => sub { my $fh = shift; while (<$fh>) {
if (/^alias\s+(\S+)\s+(.*)$/) {