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 <m...@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) = 
                                next if $suppress_cc{'author'};
-                               next if $suppress_cc{'self'} and $author eq 
+                               if ($suppress_cc{'self'}) {
+                                    my $sanitized_sender = 
+                                    next if $author eq $sanitized_sender;
+                                }
                                printf("(mbox) Adding cc: %s from line '%s'\n",
                                        $1, $_) unless $quiet;
                                push @cc, $1;
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to