summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorUwe Kleine-König <Uwe.Kleine-Koenig@digi.com>2007-11-07 08:34:12 +0100
committerJunio C Hamano <gitster@pobox.com>2007-11-07 17:23:04 -0800
commit620bb245b945531bb6e08016d5f28caf9e797786 (patch)
tree8155b16f00e6150d2695d769a85fef0f1339788b /git-send-email.perl
parent3c307bfbe8f8f9223c9b3cef8fdf2fabd05cda6d (diff)
downloadgit-620bb245b945531bb6e08016d5f28caf9e797786.tar.gz
send-email: apply --suppress-from to S-o-b and cc-cmd
Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Cc: Ryan Anderson <ryan@michonline.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl5
1 files changed, 3 insertions, 2 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 96051bc01e..f4b8f96511 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -88,8 +88,7 @@ Options:
--smtp-ssl If set, connects to the SMTP server using SSL.
- --suppress-from Suppress sending emails to yourself if your address
- appears in a From: line. Defaults to off.
+ --suppress-from Suppress sending emails to yourself. Defaults to off.
--thread Specify that the "In-Reply-To:" header should be set on all
emails. Defaults to on.
@@ -730,6 +729,7 @@ foreach my $t (@files) {
if (/^(Signed-off-by|Cc): (.*)$/i && $signed_off_cc) {
my $c = $2;
chomp $c;
+ next if ($c eq $sender and $suppress_from);
push @cc, $c;
printf("(sob) Adding cc: %s from line '%s'\n",
$c, $_) unless $quiet;
@@ -745,6 +745,7 @@ foreach my $t (@files) {
my $c = $_;
$c =~ s/^\s*//g;
$c =~ s/\n$//g;
+ next if ($c eq $sender and $suppress_from);
push @cc, $c;
printf("(cc-cmd) Adding cc: %s from: '%s'\n",
$c, $cc_cmd) unless $quiet;