DORMANTno replies

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

From: Eric W. Biederman <hidden>
Date: 2016-06-15 22:46:48
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 git-send-email.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index cccbf45..e3408d5 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -409,7 +409,7 @@ my %parse_alias = (
 	mailrc => sub { my $fh = shift; while (<$fh>) {
 		if (/^alias\s+(\S+)\s+(.*)$/) {
 			# spaces delimit multiple addresses
-			$aliases{$1} = [ split(/\s+/, $2) ];
+			$aliases{$1} = [ quotewords('\s+', 0, $2) ];
 		}}},
 	pine => sub { my $fh = shift; my $f='\t[^\t]*';
 	        for (my $x = ''; defined($x); $x = $_) {
-- 
1.6.3.1.54.g99dd.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help