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

[PATCH] git-send-email: another fix for special characters

From
MTMichael S. Tsirkin <mst@redhat.com>
Date
May 23, 2013, 14:13 UTC
Message-ID
<20130523141352.GA21462@redhat.com>

When patch sender's name has special characters, git send-email did not quote it before matching against the author name. As a result suppress_cc = self did not work: sender is still Cc'd.

Fix by sanitizing before matching to patch author name.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 git-send-email.perl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index c4dc438..a3fed7c 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1309,7 +1309,10 @@ foreach my $t (@files) {
 			elsif (/^From:\s+(.*)$/i) {
 				($author, $author_encoding) = unquote_rfc2047($1);
 				next if $suppress_cc{'author'};
-				next if $suppress_cc{'self'} and $author eq $sender;
+				if ($suppress_cc{'self'}) {
+                                    my $sanitized_sender = sanitize_address($sender);
+                                    next if $author eq $sanitized_sender;
+                                }
 				printf("(mbox) Adding cc: %s from line '%s'\n",
 					$1, $_) unless $quiet;
 				push @cc, $1;
-- 
MST
Message 1 of 1 in “git-send-email: another fix for special characters”
  1. git-send-email: another fix for special charactersMichael S. Tsirkin, May 23, 2013

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.