summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-03-08 06:12:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-03-08 06:35:34 (GMT)
commitba51795c5fc32a507df9f91ffeae21893e9e7633 (patch)
treee2447ea723b77886f93aebbbf666e744e60e5557
parentd33046c1ed2182a4f73b741e47ab28b1570805c5 (diff)
downloadgit-ba51795c5fc32a507df9f91ffeae21893e9e7633.zip
git-ba51795c5fc32a507df9f91ffeae21893e9e7633.tar.gz
git-ba51795c5fc32a507df9f91ffeae21893e9e7633.tar.bz2
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>
-rwxr-xr-xgit-send-email.perl3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 29b1105..be4a20d 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -317,7 +317,7 @@ if ($suppress_cc{'all'}) {
# 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) {
@@ -855,6 +855,7 @@ foreach my $t (@files) {
$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'});