@matheusbsbs / matheus-bagliano / commits / fe87c92138
Fork 0

git-send-email: Handle quotes when parsing .mailrc files

It is legal and not uncommon to use quotes in a .mailrc file so you can include a persons fullname as well as their email alias. Handle this by using quotewords instead of split when parsing .mailrc files. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Eric W. Biederman committed May 20, 2009 at 19:45 UTC fe87c92138d91e2002c46b06f8389814436de1cf
1 file changed +1 -1
git-send-email.perl
+1 -1
@@ -409,7 +409,7 @@ my %parse_alias = (
409 mailrc => sub { my $fh = shift; while (<$fh>) {
410 if (/^alias\s+(\S+)\s+(.*)$/) {
411 # spaces delimit multiple addresses
412 - $aliases{$1} = [ split(/\s+/, $2) ];
412 + $aliases{$1} = [ quotewords('\s+', 0, $2) ];
413 }}},
414 pine => sub { my $fh = shift; my $f='\t[^\t]*';
415 for (my $x = ''; defined($x); $x = $_) {