Skip to contentSkip to conversation

Unquote From line from patch before comparing with given from address.

PATCH In review Kristian Høgsberg 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Unquote From line from patch before comparing with given from address.

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.

---
 git-send-email.perl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
git-send-email.perl +2 -1
index eb876f8..7c0c90b 100755
@@ -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') {
Signature · 1 line
1.5.2.GIT
#1 lore raw

Thanks.

That has been longstanding, and I hinted how that can be fixed a couple of times on the list, and was waiting for somebody for whom fixing it would make a difference to fix it, while sort of pretending to be lazy.

Happy to see finally somebody stepped forward ;-).