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

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

From
Emily Shaffer <nasamuffin@google.com>
Date
May 17, 2023, 18:38 UTC
Message-ID
<CAJoAoZ=GGgjGOeaeo6RFBO7=6msdRf-Ze6XcnL04K5ugupLUJA@mail.gmail.com>
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 0002-irqchip-gic-v3-Disable-pseudo-NMIs-on-Mediatek-devic.patch 0003-arm64-dts-mediatek-mt8183-Add-mediatek-gicr-save-qui.patch 0004-arm64-dts-mediatek-mt8186-Add-mediatek-gicr-save-qui.patch 0005-arm64-dts-mediatek-mt8192-Add-mediatek-gicr-save-qui.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).

**What did you expect to happen? (Expected behavior)**
The cover letter should get an auto-generated Message-Id like it always used to.
**What happened instead? (Actual behavior)**
The cover letter ends up with the same Message-Id as the last patch.
**What's different between what you expected and what actually happened?**
See above.
**Anything else you want to add:**

This happens when using the `patman` tool to send patches with a cover letter. The individual patches encode the "Change-Id" in the Message-ID but the cover letter doesn't need any special Message-Id.

I didn't notice this until after I sent a patch series and thus:
https://lore.kernel.org/r/20230511150539.6.Ia0b6ebbaa351e3cd67e201355b9ae67783c7d718@changeid/
...refers to both my cover letter and the last patch in the series.

**Please review the rest of the bug report below. You can delete any lines you don't wish to share.**

``` [System Info] git version: git version 2.40.1.606.ga4b1b128d6-goog cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh uname: Linux 6.1.15-1rodete3-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.15-1rodete3 (2023-03-28) x86_64 compiler info: gnuc: 12.2 libc info: glibc: 2.36 $SHELL (typically, interactive shell): /bin/bash

[Enabled Hooks] commit-msg pre-auto-gc pre-commit prepare-commit-msg ```

The report references an internal build based on 2.40.1, but we were able to reproduce on upstream git version 2.41.0.rc0.4.g004e0f790f (without using `patman`).

Note that the internal report did come with the output of `git format-patch` as a zipped attachment, which I tried to attach and am hoping won't get filtered. As described in the report, the patches themselves already contain Message-IDs, but the cover letter does not. At the mail linked in the bug, you can notice that patch 6 has two Message-IDs for some reason, and the one that's clearly not generated by the `patman` helper is appended to patch 6 instead of patch 0.

Bisecting shows that this bug was introduced at a8022c5f7b (send-email: expose header information to git-send-email's sendemail-validate hook, 2023-04-19), thanks Josh for bisecting it.

 - Emily
Next: Junio C Hamano
Message 1 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.