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

Re: [PATCH 3/3] send-email: also pick up cc addresses from -by trailers

From
Rasmus Villemoes <rv@rasmusvillemoes.dk>
Date
Oct 16, 2018, 07:17 UTC
Message-ID
<ef80210d-f440-06c5-a1eb-7b3737f73adb@rasmusvillemoes.dk>
In-Reply-To
<xmqqo9buzb67.fsf@gitster-ct.c.googlers.com>
On 2018-10-16 07:57, Junio C Hamano wrote:
Show 20 quoted lines
> Rasmus Villemoes <rv@rasmusvillemoes.dk> writes:
> 
>>> I wonder if it would make it easier to grok if we made the logic
>>> inside out, i.e.
>>>
>>> 	if ($sc eq $sender) {
>>> 		...
>>> 	} else {
>>> 		if ($what =~ /^Signed-off-by$/i) {
>>> 			next if $suppress_cc{'sob'};
>>> 		} elsif ($what =~ /-by$/i) {
>>> 			next if $suppress_cc{'misc'};
>>> 		} elsif ($what =~ /^Cc$/i) {
>>> 			next if $suppress_cc{'bodycc'};> 		}
>>
>> ...yes, that's probably more readable.
> 
> OK, unless there is more comments and suggestions for improvements,
> can you send in a final version sometime not in so distant future so
> that we won't forget?
Will do, I was just waiting for more comments to come in.
 It may be surprising to existing users that
> the command now suddenly adds more addresses the user did not think
> would be added, but it would probably be easy enough for them to
> work around. 

Yeah, I thought about that, but unfortunately the whole auto-cc business is not built around some config options where we can add a new and default false. Also note that there are also cases currently where the user sends off a patch series and is surprised that lots of intended recipients were not cc'ed (that's how I picked this subject up again; I had a long series where I had put specific Cc's in each patch, at v2, some of those had given a Reviewed-by, so I changed the tags, and a --dry-run told me they wouldn't get the new version).

I suppose one could make use of -by addresses dependent on a new opt-in config option, but that's not very elegant. Another option is, for a release or two, to make a little (more) noise when picking up a -by address - something like setting a flag in the ($what =~ /-by/) branch, and testing that flag somewhere in send_message(). But I suppose the message printed when needs_confirm eq "inform" is generic enough.

Rasmus
Previous: Junio C HamanoNext: Junio C Hamano
Message 14 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.