Skip to content

Commit

Permalink
send-email: --no-signed-off-cc should suppress 'sob' cc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Mar 8, 2008
1 parent d33046c commit ba51795
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ sub read_config {

# If explicit old-style ones are specified, they trump --suppress-cc.
$suppress_cc{'self'} = $suppress_from if defined $suppress_from;
$suppress_cc{'sob'} = $signed_off_cc if defined $signed_off_cc;
$suppress_cc{'sob'} = !$signed_off_cc if defined $signed_off_cc;

# Debugging, print out the suppressions.
if (0) {
Expand Down Expand Up @@ -855,6 +855,7 @@ sub send_message
$message .= $_;
if (/^(Signed-off-by|Cc): (.*)$/i) {
next if ($suppress_cc{'sob'});
chomp;
my $c = $2;
chomp $c;
next if ($c eq $sender and $suppress_cc{'self'});
Expand Down

0 comments on commit ba51795

Please sign in to comment.