提交 83acaaec 编写于 作者: J Joe Perches 提交者: Junio C Hamano

git-send-email.perl: Deduplicate "to:" and "cc:" entries with names

If an email address in the "to:" list is in the style
"First Last <email@domain.tld>", ie: not just a bare
address like "email@domain.tld", and the same named
entry style exists in the "cc:" list, the current
logic will not remove the entry from the "cc:" list.

Add logic to better deduplicate the "cc:" list by also
matching the email address with angle brackets.
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 e93368d2
......@@ -940,7 +940,7 @@ sub maildomain {
sub send_message {
my @recipients = unique_email_list(@to);
@cc = (grep { my $cc = extract_valid_address($_);
not grep { $cc eq $_ } @recipients
not grep { $cc eq $_ || $_ =~ /<\Q${cc}\E>$/ } @recipients
}
map { sanitize_address($_) }
@cc);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册