summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorAsk Bjørn Hansen <ask@develooper.com>2007-11-19 03:00:26 -0800
committerJunio C Hamano <gitster@pobox.com>2007-11-20 13:16:09 -0800
commit7ac17529297910c7b4502bdfa543ddec3f943413 (patch)
tree0a024ef62b86a11719cde29677413d257b7072c2 /git-send-email.perl
parent59adeef48fcc3ea3e1288ce62260fdd8f46240da (diff)
downloadgit-7ac17529297910c7b4502bdfa543ddec3f943413.tar.gz
send-email: Don't add To: recipients to the Cc: header
Signed-off-by: Ask Bjørn Hansen <ask@develooper.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 47afc56915..990e44bf02 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -557,7 +557,11 @@ sub sanitize_address
sub send_message
{
my @recipients = unique_email_list(@to);
- @cc = (map { sanitize_address($_) } @cc);
+ @cc = (grep { my $cc = extract_valid_address($_);
+ not grep { $cc eq $_ } @recipients
+ }
+ map { sanitize_address($_) }
+ @cc);
my $to = join (",\n\t", @recipients);
@recipients = unique_email_list(@recipients,@cc,@bcclist);
@recipients = (map { extract_valid_address($_) } @recipients);