send-email: fix suppress-cc=self on cccmd
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 5 Jun 2013 18:10:55 +0000 (21:10 +0300)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Jun 2013 19:26:43 +0000 (12:26 -0700)
When cccmd is used, old-style suppress-from filter
is applied by the newer suppress-cc=self isn't.
Fix this up.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl
index 70cad15ec46d0ed32f3b97c792e9d975ece53fd8..d8344368b6105245ef02921e40147c40f1873012 100755 (executable)
@@ -1446,7 +1446,7 @@ sub recipients_cmd {
                $address =~ s/^\s*//g;
                $address =~ s/\s*$//g;
                $address = sanitize_address($address);
-               next if ($address eq $sanitized_sender and $suppress_from);
+               next if ($address eq $sanitized_sender and $suppress_cc{'self'});
                push @addresses, $address;
                printf("($prefix) Adding %s: %s from: '%s'\n",
                       $what, $address, $cmd) unless $quiet;