Skip to content

Commit 7ac1752

Browse files
abhgitster
authored andcommitted
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>
1 parent 59adeef commit 7ac1752

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

git-send-email.perl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,11 @@ sub sanitize_address
557557
sub send_message
558558
{
559559
my @recipients = unique_email_list(@to);
560-
@cc = (map { sanitize_address($_) } @cc);
560+
@cc = (grep { my $cc = extract_valid_address($_);
561+
not grep { $cc eq $_ } @recipients
562+
}
563+
map { sanitize_address($_) }
564+
@cc);
561565
my $to = join (",\n\t", @recipients);
562566
@recipients = unique_email_list(@recipients,@cc,@bcclist);
563567
@recipients = (map { extract_valid_address($_) } @recipients);

0 commit comments

Comments
 (0)