From: Christian Biesinger Date: Sat, 11 Feb 2006 02:47:17 GMT Subject: [PATCH] Don't send copies to the From: address Message-ID: <11396260373307-git-send-email-cbiesinger@web.de> Sending copies to the from address is pointless. Not sending copies there makes it possible to do: git-format-patch --mbox origin git-send-email 00* and get a reasonable result. Signed-off-by: Christian Biesinger --- git-send-email.perl | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) 486a15e29dff39ff5885d7a1e38d6c5c3b70127b diff --git a/git-send-email.perl b/git-send-email.perl index 3f1b3ca..31d23d6 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -304,9 +304,11 @@ foreach my $t (@files) { $subject = $1; } elsif (/^(Cc|From):\s+(.*)$/) { - printf("(mbox) Adding cc: %s from line '%s'\n", - $2, $_) unless $quiet; - push @cc, $2; + unless ($2 eq $from) { + printf("(mbox) Adding cc: %s from line '%s'\n", + $2, $_) unless $quiet; + push @cc, $2; + } } } else { @@ -335,9 +337,11 @@ foreach my $t (@files) { if (/^Signed-off-by: (.*)$/i) { my $c = $1; chomp $c; - push @cc, $c; - printf("(sob) Adding cc: %s from line '%s'\n", - $c, $_) unless $quiet; + unless ($c eq $from) { + push @cc, $c; + printf("(sob) Adding cc: %s from line '%s'\n", + $c, $_) unless $quiet; + } } } } -- 1.1.6.g71f7-dirty