git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ask Bjørn Hansen" <ask@develooper.com>
To: git@vger.kernel.org
Cc: "Ask Bjørn Hansen" <ask@develooper.com>
Subject: [PATCH] Don't add To: recipients to the Cc: header
Date: Mon, 19 Nov 2007 03:00:26 -0800	[thread overview]
Message-ID: <1195470026-7389-1-git-send-email-ask@develooper.com> (raw)


Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
---
 git-send-email.perl |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index 65620ab..530b456 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -557,8 +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);
-- 
1.5.3.5.561.g140d

             reply	other threads:[~2007-11-19 11:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-19 11:00 Ask Bjørn Hansen [this message]
2007-11-19 11:05 ` [PATCH] Don't add To: recipients to the Cc: header Ask Bjørn Hansen
2007-11-20  7:52 ` Junio C Hamano
2007-11-20  9:36   ` Ask Bjørn Hansen
2007-11-20 19:04     ` Junio C Hamano
2007-11-20 19:18       ` Sergei Organov
2007-11-20 20:21         ` Junio C Hamano
2007-11-23 17:53           ` Sergei Organov
2007-11-23 19:48             ` Junio C Hamano
2007-11-23 20:18               ` Sergei Organov
2007-11-23 23:54                 ` Junio C Hamano
2007-11-26 13:48                   ` Sergei Organov
2007-11-26 16:53                     ` Junio C Hamano
2007-11-26 18:29                       ` Sergei Organov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1195470026-7389-1-git-send-email-ask@develooper.com \
    --to=ask@develooper.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).