git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Eric W. Biederman <ebiederm@xmission.com>
Date
May 21, 2009, 02:45 UTC
Message-ID
<1242873953-21394-1-git-send-email-ebiederm@xmission.com>

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
Message 1 of 1 in “git-send-email: Handle quotes when parsing .mailrc files”
  1. git-send-email: Handle quotes when parsing .mailrc filesEric W. Biederman, May 21, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.