@matheusbsbs / matheus-bagliano / commits / ba51795c5f
Fork 0

send-email: --no-signed-off-cc should suppress 'sob' cc

The logic to countermand suppression of Cc to the signers with a more explicit --signed-off-by option done in 6564828 (git-send-email: Generalize auto-cc recipient mechanism) suffers from a double-negation error. A --signed-off-cc option, when false, should actively suppress CC: to be generated out of S-o-b lines, and it should refrain from suppressing when it is true. It also fixes "(sob) Adding cc:" status output; earlier it included the line terminator LF inside '%s', which was totally bogus. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Mar 7, 2008 at 22:12 UTC ba51795c5fc32a507df9f91ffeae21893e9e7633
1 file changed +2 -1
git-send-email.perl
+2 -1
@@ -317,7 +317,7 @@ if ($suppress_cc{'all'}) {
317
318 # If explicit old-style ones are specified, they trump --suppress-cc.
319 $suppress_cc{'self'} = $suppress_from if defined $suppress_from;
320 -$suppress_cc{'sob'} = $signed_off_cc if defined $signed_off_cc;
320 +$suppress_cc{'sob'} = !$signed_off_cc if defined $signed_off_cc;
321
322 # Debugging, print out the suppressions.
323 if (0) {
@@ -855,6 +855,7 @@ foreach my $t (@files) {
855 $message .= $_;
856 if (/^(Signed-off-by|Cc): (.*)$/i) {
857 next if ($suppress_cc{'sob'});
858 + chomp;
859 my $c = $2;
860 chomp $c;
861 next if ($c eq $sender and $suppress_cc{'self'});