From 7ac17529297910c7b4502bdfa543ddec3f943413 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Mon, 19 Nov 2007 03:00:26 -0800 Subject: [PATCH] send-email: Don't add To: recipients to the Cc: header MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Ask Bjørn Hansen Signed-off-by: Junio C Hamano --- git-send-email.perl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/git-send-email.perl b/git-send-email.perl index 47afc5691..990e44bf0 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); -- 2.26.2