Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Emily Shaffer <nasamuffin@google.com>
Cc: Git List <git@vger.kernel.org>,
	michael.strawbridge@amd.com, dianders@chromium.org
Subject: Re: bug report: cover letter is inheriting last patch's message ID with send-email
Date: Wed, 17 May 2023 12:01:31 -0700	[thread overview]
Message-ID: <xmqqo7mipyt0.fsf@gitster.g> (raw)
In-Reply-To: <CAJoAoZ=GGgjGOeaeo6RFBO7=6msdRf-Ze6XcnL04K5ugupLUJA@mail.gmail.com> (Emily Shaffer's message of "Wed, 17 May 2023 11:38:01 -0700")

Emily Shaffer <nasamuffin@google.com> writes:

> Following is a report from inside of Google:
>
> **What did you do before the bug happened? (Steps to reproduce your issue)**
>
> ```
> # With the attached patches, where all of the patches have a
> # Message-Id but the cover letter doesn't.
> git send-email *.patch
> ```
>
> Specifically, you can see me doing it:
>
> ```
> $ git send-email *.patch
> 0000-cover-letter.patch
> 0001-dt-bindings-interrupt-controller-arm-gic-v3-Add-quir.patch
> ...
> 0006-arm64-dts-mediatek-mt8195-Add-mediatek-gicr-save-qui.patch
> To whom should the emails be sent (if anyone)?
> Message-ID to be used as In-Reply-To for the first email (if any)?
> (mbox) Adding cc: Douglas Anderson <dianders@chromium.org> from line
> 'From: Douglas Anderson <dianders@chromium.org>'
>
> From: Douglas Anderson <dianders@chromium.org>
> To:
> Cc: Douglas Anderson <dianders@chromium.org>
> Subject: [PATCH 0/6] irqchip/gic-v3: Disable pseudo NMIs on Mediatek
> Chromebooks w/ bad FW
> Date: Thu, 11 May 2023 15:25:55 -0700
> Message-ID: <20230511151719.6.Ia0b6ebbaa351e3cd67e201355b9ae67783c7d718@changeid>
> ```
>
> If you look at `0000-cover-letter.patch` you can see that it has no
> Message-ID, but the above clearly shows that the cover letter is being
> sent with a Message-ID (and the one from the last patch).

It is correct that Message-ID needs to be assigned by send-email if
the outgoing message lacks one.  I am not sure what is meant by
"from the last patch".  Do you mean that Message-ID exists in
0006-*.patch but not in 0000-cover-letter.patch [*]?  I suspect that
is the root cause of the problem; if 000[1-6]-*.patch already has
their own Message-ID: because --thread is used when running
git-format-patch, they would also have In-Reply-To: and References:,
but there is no way for them to reference 0000-cover-letter.patch
(because format-patch did not get a chance to generate Message-ID to
it), is there?

Is this because format-patch was used without --cover-letter but
with --thread to prepare 000[1-6]*.patch and the cover letter was
created separately, or something?

The simplest fix I can think of is to stop using Message-ID related
options when running format-patch, and let send-email do the
threading.  It would avoid problems coming from mixing output from
multiple format-patch runs.


[Footnote]

 * As a reproduction recipe, the report should tell how these files
   were prepared (format-patch with what arguments to get there).

  reply	other threads:[~2023-05-17 19:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17 18:38 bug report: cover letter is inheriting last patch's message ID with send-email Emily Shaffer
2023-05-17 19:01 ` Junio C Hamano [this message]
2023-05-17 19:22   ` Junio C Hamano
2023-05-17 20:14     ` Doug Anderson
2023-05-17 20:21       ` Junio C Hamano
2023-05-18  0:51     ` Michael Strawbridge
2023-05-18  1:06       ` Junio C Hamano
2023-05-17 19:24   ` Doug Anderson
2023-05-17 20:04     ` Junio C Hamano
2023-05-17 20:20       ` Doug Anderson

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqo7mipyt0.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=dianders@chromium.org \
    --cc=git@vger.kernel.org \
    --cc=michael.strawbridge@amd.com \
    --cc=nasamuffin@google.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.
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).