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

[PATCH] Unquote From line from patch before comparing with given from address.

From
Kristian Høgsberg <krh@redhat.com>
Date
Jun 11, 2007, 17:04 UTC
Message-ID
<11815814802456-git-send-email-krh@redhat.com>

This makes --suppress-from actually work when you're unfortunate enough to have non-ASCII in your name. Also, if there's a match use the optionally RFC2047 quoted version from the email.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
---
 git-send-email.perl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index eb876f8..7c0c90b 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -561,7 +561,8 @@ foreach my $t (@files) {
 					$subject = $1;
 
 				} elsif (/^(Cc|From):\s+(.*)$/) {
-					if ($2 eq $from) {
+					if (unquote_rfc2047($2) eq $from) {
+						$from = $2;
 						next if ($suppress_from);
 					}
 					elsif ($1 eq 'From') {
-- 
1.5.2.GIT
Next: Junio C Hamano
Message 1 of 2 in “Unquote From line from patch before comparing with given from address.”
  1. Unquote From line from patch before comparing with given from address.Kristian Høgsberg, Jun 11, 2007
  2. Junio C HamanoJun 12, 2007

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.