git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Don't add To: recipients to the Cc: header

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 20, 2007, 07:52 UTC
Message-ID
<7vr6ill5f1.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1195470026-7389-1-git-send-email-ask@develooper.com>
Ask Bjørn Hansen <ask@develooper.com> writes:
Show 24 quoted lines
> 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
How did you prepare and send this patch?

I see 7 preimage lines and 11 postimage lines, although the hunk header claims otherwise.

Did you edit the patch in Emacs diff mode or something?
Previous: Ask Bjørn HansenNext: Ask Bjørn Hansen
Message 3 of 14 in “Don't add To: recipients to the Cc: header”
  1. Don't add To: recipients to the Cc: headerAsk Bjørn Hansen, Nov 19, 2007
  2. Ask Bjørn HansenNov 19, 2007
  3. Junio C HamanoNov 20, 2007
  4. Ask Bjørn HansenNov 20, 2007
  5. Junio C HamanoNov 20, 2007
  6. Sergei OrganovNov 20, 2007
  7. Junio C HamanoNov 20, 2007
  8. Sergei OrganovNov 23, 2007
  9. Junio C HamanoNov 23, 2007
  10. Sergei OrganovNov 23, 2007
  11. Junio C HamanoNov 23, 2007
  12. Sergei OrganovNov 26, 2007
  13. Junio C HamanoNov 26, 2007
  14. Sergei OrganovNov 26, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.