git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: "Marvin Häuser" <mhaeuser@posteo.de>
Cc: git@vger.kernel.org
Subject: Re: [BUG] send-email propagates "In-Reply-To"
Date: Tue, 24 Aug 2021 20:15:26 -0400	[thread overview]
Message-ID: <YSWLnlkF/BuyI0yi@coredump.intra.peff.net> (raw)
In-Reply-To: <2412df60-f8ee-ab0f-08b2-20a0b6b641fa@posteo.de>

On Mon, Aug 23, 2021 at 09:47:28PM +0000, Marvin Häuser wrote:

> > 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.

> > 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

      parent reply	other threads:[~2021-08-25  0:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-22  9:24 [BUG] send-email propagates "In-Reply-To" Marvin Häuser
2021-08-22 12:11 ` Bagas Sanjaya
2021-08-23 16:35 ` Jeff King
2021-08-23 17:44   ` Marvin Häuser
2021-08-23 18:27     ` Jeff King
2021-08-23 21:47       ` Marvin Häuser
2021-08-24  7:48         ` Carlo Marcelo Arenas Belón
2021-08-25  0:15         ` Jeff King [this message]

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=YSWLnlkF/BuyI0yi@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=mhaeuser@posteo.de \
    /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).