git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 17:23 UTC

Re: [PATCH] send-email: don't cc *-by lines with '-' prefix

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 4, 2019, 09:49 UTC
Message-ID
<xmqqy34qdrr2.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<eec56beab016182fb78fbd367fcfa97f2ca6a5ff.1552764410.git.baruch@tkos.co.il>
Baruch Siach <baruch@tkos.co.il> writes:
Show 31 quoted lines
> Since commit ef0cc1df90f6b ("send-email: also pick up cc addresses from
> -by trailers") in git version 2.20, git send-email adds to cc list
> addresses from all *-by lines. As a side effect a line with
> '-Signed-off-by' is now also added to cc. This makes send-email pick
> lines from patches that remove patch files from the git repo. This is
> common in the Buildroot project that often removes (and adds) patch
> files that have 'Signed-off-by' in their patch description part.
>
> Consider only *-by lines that start with [a-z] (case insensitive) to
> avoid unrelated addresses in cc.
>
> Cc: Joe Perches <joe@perches.com>
> Cc: Rasmus Villemoes <rv@rasmusvillemoes.dk>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  git-send-email.perl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 8eb63b5a2f8d..5656ba83d9b1 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -1693,7 +1693,7 @@ sub process_file {
>  	# Now parse the message body
>  	while(<$fh>) {
>  		$message .=  $_;
> -		if (/^([a-z-]*-by|Cc): (.*)/i) {
> +		if (/^([a-z][a-z-]*-by|Cc): (.*)/i) {
>  			chomp;
>  			my ($what, $c) = ($1, $2);
>  			# strip garbage for the address we'll use:

OK, this fell through the cracks (and it did not help that a recent ping message did not come as a response to it, but as a response to another thread with an alternative implementation). Will apply and cook in 'next' to see what happens.

FYI, being in 'next' does not mean it will be in the next release. Being in 'master' usually does, though.

Previous: Junio C HamanoNext: Jeff King
Message 17 of 18 in “send-email: don't cc *-by lines with '-' prefix”
  1. send-email: don't cc *-by lines with '-' prefixBaruch Siach, Mar 16, 2019
  2. Joe PerchesMar 16, 2019
  3. Baruch SiachMar 16, 2019
  4. Joe PerchesMar 16, 2019
  5. Baruch SiachMar 16, 2019
  6. Joe PerchesMar 16, 2019
  7. Rasmus VillemoesMar 17, 2019
  8. Joe PerchesMar 18, 2019
  9. Junio C HamanoMar 18, 2019
  10. Joe PerchesMar 18, 2019
  11. Baruch SiachApr 4, 2019
  12. Junio C HamanoApr 4, 2019
  13. Baruch SiachApr 4, 2019
  14. Junio C HamanoApr 4, 2019
  15. Rasmus VillemoesApr 4, 2019
  16. Junio C HamanoApr 4, 2019
  17. Junio C HamanoApr 4, 2019
  18. Jeff KingApr 4, 2019

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.