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

Re: [BUG] send-email propagates "In-Reply-To"

From
Jeff King <peff@peff.net>
Date
Aug 25, 2021, 00:15 UTC
Message-ID
<YSWLnlkF/BuyI0yi@coredump.intra.peff.net>
In-Reply-To
<2412df60-f8ee-ab0f-08b2-20a0b6b641fa@posteo.de>
On Mon, Aug 23, 2021 at 09:47:28PM +0000, Marvin Häuser wrote:
Show 7 quoted lines
> > You'd want something like the patch below (and possibly something
> > similar for the $subject handling).
> 
> Thanks a lot! my last question for the patch would now be, how do I use your
> snippet? Do I add you to S-o-b of the single patch, do I split the patches
> with the second S-o-b being yours, or do I submit only the first and you
> will submit the second?

The usual thing is to just squash it into your patch. You can say something like "Test cases from Jeff King." in the commit message to give credit (though I am happy either way). And then ideally you'd have my sign-off to make it clear the code matches the DCO. So here it is (and you can just stick this before your sign-off at the end of the commit message):

Signed-off-by: Jeff King <peff@peff.net>

And then for the rest, you can follow the guide in Documentation/SubmittingPatches. Presumably you're comfortable using send-email, given the topic of the patch. :) But since you're got the patch on GitHub already, you can also use https://gitgitgadget.github.io.

Show 9 quoted lines
> > Both of the new tests fail without your patch and pass with it, but:
> > 
> >    - note the weird behavior I found with --in-reply-to; this is
> >      something we might want to address at the same time
> 
> I think this case must error? The definition of the "--in-reply-to" does not
> declare it as a default, so it must be enforced (and it is), but it's also
> very unintuitive the file value is discarded. Who would decide the behaviour
> spec?

Given the text Carlo found in the documentation, I think this is the intended behavior. So I think we can make it part of the expected behavior in the test. I do still think that second test is worth having. An obvious-but-wrong thing to do here would be to set $in_reply_to to undef after the first iteration through the loop, rather than the value given on the command-line. The test makes sure we get that right.

-Peff
Previous: Carlo Marcelo Arenas Belón
Message 8 of 8 in “[BUG] send-email propagates "In-Reply-To"”
  1. Marvin HäuserAug 22, 2021
  2. Bagas SanjayaAug 22, 2021
  3. Jeff KingAug 23, 2021
  4. Marvin HäuserAug 23, 2021
  5. Jeff KingAug 23, 2021
  6. Marvin HäuserAug 23, 2021
  7. Carlo Marcelo Arenas BelónAug 24, 2021
  8. Jeff KingAug 25, 2021

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.