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

Re: bug report: cover letter is inheriting last patch's message ID with send-email

From
DADoug Anderson <dianders@chromium.org>
Date
May 17, 2023, 19:24 UTC
Message-ID
<CAD=FV=XnzFrczC1dvsHYgNabZMhC7-K1uG8=MH20qNE25o0CEA@mail.gmail.com>
In-Reply-To
<xmqqo7mipyt0.fsf@gitster.g>
Hi,
On Wed, May 17, 2023 at 12:01 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 43 quoted lines
>
> 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 [*]?

Yes. It exists in all of the patches except 0000-cover-letter.patch. ...but when the mail gets actually sent the cover letter and last patch (0006 in the case I reported) end up sharing the same Change ID. With older versions of git send-email the cover letter would get an auto-generated Message-Id.

Show 7 quoted lines
> 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?

The patches were generated with git-format-patch but the Message-ID was added by patman [1]. The Message-ID encodes the local Change-Id which can make it easier to associate one version of the same patch with another (same reason gerrit uses Change-Id) [2]. There is no Change-Id associated with the cover letter so patman doesn't bother adding one there and has always just let it be auto-generated. We could certainly change patman to make up a Message-Id for the cover letter, but there is no real need.

[1] https://source.denx.de/u-boot/u-boot/-/blob/master/tools/patman/patman.rst [2] https://source.denx.de/u-boot/u-boot/-/commit/833e4192cd791733ddc0106996a4f86f9269ceba

Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 10 in “bug report: cover letter is inheriting last patch's message ID with send-email”
  1. Emily ShafferMay 17, 2023
  2. Junio C HamanoMay 17, 2023
  3. Junio C HamanoMay 17, 2023
  4. Doug AndersonMay 17, 2023
  5. Junio C HamanoMay 17, 2023
  6. Michael StrawbridgeMay 18, 2023
  7. Junio C HamanoMay 18, 2023
  8. Doug AndersonMay 17, 2023
  9. Junio C HamanoMay 17, 2023
  10. Doug AndersonMay 17, 2023

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.