git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] send-email: don't cc *-by lines with '-' prefix
@ 2019-03-16 19:26 Baruch Siach
  2019-03-16 19:30 ` Joe Perches
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Baruch Siach @ 2019-03-16 19:26 UTC (permalink / raw)
  To: git; +Cc: Baruch Siach, Joe Perches, Rasmus Villemoes

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:
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-04-04 12:14 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).