git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 0/3] send-email: Also pick up cc addresses from -by trailers

From
Rasmus Villemoes <rv@rasmusvillemoes.dk>
Date
Oct 16, 2018, 07:39 UTC
Message-ID
<20181016073923.28134-1-rv@rasmusvillemoes.dk>
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
Previous: Junio C HamanoNext: Rasmus Villemoes
Message 16 of 20 in “send-email: Also pick up cc addresses from -by trailers”
  1. 0/3 send-email: Also pick up cc addresses from -by trailersRasmus Villemoes, Oct 10, 2018
  2. 1/3 Documentation/git-send-email.txt: style fixesRasmus Villemoes, Oct 10, 2018
  3. 2/3 send-email: only consider lines containing @ or <> for automatic Cc'ingRasmus Villemoes, Oct 10, 2018
  4. Ævar Arnfjörð BjarmasonOct 10, 2018
  5. Rasmus VillemoesOct 10, 2018
  6. Junio C HamanoOct 11, 2018
  7. Rasmus VillemoesOct 11, 2018
  8. Junio C HamanoOct 11, 2018
  9. 3/3 send-email: also pick up cc addresses from -by trailersRasmus Villemoes, Oct 10, 2018
  10. Ævar Arnfjörð BjarmasonOct 10, 2018
  11. Junio C HamanoOct 11, 2018
  12. Rasmus VillemoesOct 11, 2018
  13. Junio C HamanoOct 16, 2018
  14. Rasmus VillemoesOct 16, 2018
  15. Junio C HamanoOct 16, 2018
  16. 0/3 send-email: Also pick up cc addresses from -by trailersRasmus Villemoes, Oct 16, 2018
  17. 1/3 Documentation/git-send-email.txt: style fixesRasmus Villemoes, Oct 16, 2018
  18. 2/3 send-email: only consider lines containing @ or <> for automatic Cc'ingRasmus Villemoes, Oct 16, 2018
  19. 3/3 send-email: also pick up cc addresses from -by trailersRasmus Villemoes, Oct 16, 2018
  20. Junio C HamanoOct 16, 2018

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.