mirror of
https://github.com/git/git.git
synced 2024-06-10 05:16:15 +02:00
send-email: don't cc *-by lines with '-' prefix
Since commit ef0cc1df90
("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>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Acked-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
041f5ea1cf
commit
9c545816be
|
@ -1699,7 +1699,7 @@ sub process_file {
|
||||||
# Now parse the message body
|
# Now parse the message body
|
||||||
while(<$fh>) {
|
while(<$fh>) {
|
||||||
$message .= $_;
|
$message .= $_;
|
||||||
if (/^([a-z-]*-by|Cc): (.*)/i) {
|
if (/^([a-z][a-z-]*-by|Cc): (.*)/i) {
|
||||||
chomp;
|
chomp;
|
||||||
my ($what, $c) = ($1, $2);
|
my ($what, $c) = ($1, $2);
|
||||||
# strip garbage for the address we'll use:
|
# strip garbage for the address we'll use:
|
||||||
|
|
Loading…
Reference in New Issue