Skip to content

Commit fe87c92

Browse files
ebiedermgitster
authored andcommitted
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>
1 parent 065b070 commit fe87c92

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

git-send-email.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ sub split_addrs {
409409
mailrc => sub { my $fh = shift; while (<$fh>) {
410410
if (/^alias\s+(\S+)\s+(.*)$/) {
411411
# spaces delimit multiple addresses
412-
$aliases{$1} = [ split(/\s+/, $2) ];
412+
$aliases{$1} = [ quotewords('\s+', 0, $2) ];
413413
}}},
414414
pine => sub { my $fh = shift; my $f='\t[^\t]*';
415415
for (my $x = ''; defined($x); $x = $_) {

0 commit comments

Comments
 (0)