From: Joe Perches Date: Sat, 20 Nov 2010 23:06:05 +0000 (-0800) Subject: git-send-email.perl: Deduplicate "to:" and "cc:" entries with names X-Git-Tag: v1.7.3.3~32 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=83acaaec12fcf33e605f441216ecc91c81b90449;p=git.git 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 ", 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: Joe Perches Signed-off-by: Junio C Hamano --- diff --git a/git-send-email.perl b/git-send-email.perl index e1f29a72a..92bcbd085 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -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);