* [PATCH] git-send-email: Handle quotes when parsing .mailrc files
@ 2009-05-21 2:45 Eric W. Biederman
0 siblings, 0 replies; only message in thread
From: Eric W. Biederman @ 2009-05-21 2:45 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Eric W. Biederman
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>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-05-21 2:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-21 2:45 [PATCH] git-send-email: Handle quotes when parsing .mailrc files Eric W. Biederman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).