All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Baruch Siach <baruch@tkos.co.il>
Cc: git@vger.kernel.org, Joe Perches <joe@perches.com>,
	Rasmus Villemoes <rv@rasmusvillemoes.dk>
Subject: Re: [PATCH] send-email: don't cc *-by lines with '-' prefix
Date: Thu, 04 Apr 2019 18:49:53 +0900	[thread overview]
Message-ID: <xmqqy34qdrr2.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <eec56beab016182fb78fbd367fcfa97f2ca6a5ff.1552764410.git.baruch@tkos.co.il> (Baruch Siach's message of "Sat, 16 Mar 2019 21:26:50 +0200")

Baruch Siach <baruch@tkos.co.il> writes:

> 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.

      parent reply	other threads:[~2019-04-04  9:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-16 19:26 [PATCH] send-email: don't cc *-by lines with '-' prefix Baruch Siach
2019-03-16 19:30 ` Joe Perches
2019-03-16 19:49   ` Baruch Siach
2019-03-16 19:59     ` Joe Perches
2019-03-16 20:14       ` Baruch Siach
2019-03-16 20:23         ` Joe Perches
2019-03-17 19:27 ` Rasmus Villemoes
2019-03-18  1:56   ` Joe Perches
2019-03-18  6:28     ` Junio C Hamano
2019-03-18  7:02       ` Joe Perches
2019-04-04  7:38       ` Baruch Siach
2019-04-04  9:20         ` Junio C Hamano
2019-04-04  9:27           ` Baruch Siach
2019-04-04  9:41             ` Junio C Hamano
2019-04-04  9:42             ` Rasmus Villemoes
2019-04-04  9:47               ` Junio C Hamano
2019-04-04 12:14               ` Jeff King
2019-04-04  9:49 ` Junio C Hamano [this message]

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=xmqqy34qdrr2.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=baruch@tkos.co.il \
    --cc=git@vger.kernel.org \
    --cc=joe@perches.com \
    --cc=rv@rasmusvillemoes.dk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.