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

[PATCH] send-email: use sanitized address for cc

From
Cchangbin.du@gmail.com <changbin.du@gmail.com>
Date
Sep 7, 2016, 06:57 UTC
Message-ID
<20160907065733.28467-1-changbin.du@gmail.com>
From: "Du, Changbin" <changbin.du@gmail.com>

Some username in the email address may include a ','. In this case, we need quoting the username field so it will not be parsed as two single addresses by Mail::Address->parse().

For example, my eamil address "Du, Changbin <changbin.du@gmail.com>" can be parsed as two addresses "Du" and "Changbin <changbin.du@gmail.com>" if username is not quoted. ("Du, Changbin" is a legal format of signature in Chinese)

The sanitized address can be used because quote is added automactically.
Signed-off-by: Du, Changbin <changbin.du@gmail.com>
---
 git-send-email.perl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 6958785..6ec189e 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1554,9 +1554,9 @@ foreach my $t (@files) {
 				next if $suppress_cc{'sob'} and $what =~ /Signed-off-by/i;
 				next if $suppress_cc{'bodycc'} and $what =~ /Cc/i;
 			}
-			push @cc, $c;
+			push @cc, $sc;
 			printf("(body) Adding cc: %s from line '%s'\n",
-				$c, $_) unless $quiet;
+				$sc, $_) unless $quiet;
 		}
 	}
 	close $fh;
-- 
2.7.4
Message 1 of 1 in “send-email: use sanitized address for cc”
  1. send-email: use sanitized address for ccchangbin.du@gmail.com, Sep 7, 2016

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.