From: Rasmus Villemoes <rv@rasmusvillemoes.dk>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
Rasmus Villemoes <rv@rasmusvillemoes.dk>
Subject: [PATCH v2 0/3] send-email: Also pick up cc addresses from -by trailers
Date: Tue, 16 Oct 2018 09:39:20 +0200 [thread overview]
Message-ID: <20181016073923.28134-1-rv@rasmusvillemoes.dk> (raw)
In-Reply-To: <20181010111351.5045-1-rv@rasmusvillemoes.dk>
This series extends the logic in git-send-email so that addresses
appearing in various *-by: trailers (e.g. Reviewed-by, Acked-by,
Tested-by) are picked up and added to the Cc list, in addition to the
current logic that picks up Cc: and Signed-off-by: lines.
This deliberately only picks up -by trailers (as opposed to any
trailer), based on the heuristic that the -by suffix strongly suggests
there's a (name +) email address after the colon. This avoids having
to deal with BugID:, Link:, or other such tags. Still, widening to any
-by trailer does increase the risk that we will pick up stuff that is
not an email address, such as
Reported-by: Coverity
Patch-generated-by: Coccinelle
where send-email then ends up cc'ing the local 'coverity' user. Patch
2 tries to weed out the obvious no-email-address-here cases, which
should also help avoid cc'ing garbage (local) addresses for malformed
cc and signed-off-by lines. Patch 3 is then mostly mechanical,
introducing the misc-by suppression category and changing the regexp
for matching trailer lines to include .*-by.
Changes in v2: Rework logic in patch 3 as suggested by Junio.
v1 cover letter:
This has been attempted multiple times before, but I hope that this
can make it in this time around. That *-by addresses are not
automatically Cc'ed certainly still surprises people from time to
time.
I hope that this addresses all the concerns Junio had in
https://lkml.org/lkml/2016/8/31/768 .
For the name, I chose 'misc-by', since that has -by in its name. I am
fine with absolutely any other name (bodyby, body-by, by-trailers,
...). I doubt we can find a short token that is completely
self-explanatory, and note that one has to look in the man page anyway
to know what 'sob' means in this line from 'git send-email -h':
--suppress-cc <str> * author, self, sob, cc, cccmd, body, bodycc, all.
Rasmus Villemoes (3):
Documentation/git-send-email.txt: style fixes
send-email: only consider lines containing @ or <> for automatic
Cc'ing
send-email: also pick up cc addresses from -by trailers
Documentation/git-send-email.txt | 11 +++++++----
git-send-email.perl | 24 +++++++++++++++++-------
2 files changed, 24 insertions(+), 11 deletions(-)
--
2.19.1.6.gbde171bbf5
next prev parent reply other threads:[~2018-10-16 7:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-10 11:13 [PATCH 0/3] send-email: Also pick up cc addresses from -by trailers Rasmus Villemoes
2018-10-10 11:13 ` [PATCH 1/3] Documentation/git-send-email.txt: style fixes Rasmus Villemoes
2018-10-10 11:13 ` [PATCH 2/3] send-email: only consider lines containing @ or <> for automatic Cc'ing Rasmus Villemoes
2018-10-10 12:57 ` Ævar Arnfjörð Bjarmason
2018-10-10 13:29 ` Rasmus Villemoes
2018-10-11 6:06 ` Junio C Hamano
2018-10-11 7:06 ` Rasmus Villemoes
2018-10-11 8:22 ` Junio C Hamano
2018-10-10 11:13 ` [PATCH 3/3] send-email: also pick up cc addresses from -by trailers Rasmus Villemoes
2018-10-10 12:51 ` Ævar Arnfjörð Bjarmason
2018-10-11 6:18 ` Junio C Hamano
2018-10-11 7:11 ` Rasmus Villemoes
2018-10-16 5:57 ` Junio C Hamano
2018-10-16 7:17 ` Rasmus Villemoes
2018-10-16 7:46 ` Junio C Hamano
2018-10-16 7:39 ` Rasmus Villemoes [this message]
2018-10-16 7:39 ` [PATCH v2 1/3] Documentation/git-send-email.txt: style fixes Rasmus Villemoes
2018-10-16 7:39 ` [PATCH v2 2/3] send-email: only consider lines containing @ or <> for automatic Cc'ing Rasmus Villemoes
2018-10-16 7:39 ` [PATCH v2 3/3] send-email: also pick up cc addresses from -by trailers Rasmus Villemoes
2018-10-16 7:57 ` [PATCH v2 0/3] send-email: Also " Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181016073923.28134-1-rv@rasmusvillemoes.dk \
--to=rv@rasmusvillemoes.dk \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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.
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).