Git Mailing List Archive mirror
 help / color / mirror / Atom feed
* bug report: cover letter is inheriting last patch's message ID with send-email
@ 2023-05-17 18:38 Emily Shaffer
  2023-05-17 19:01 ` Junio C Hamano
  0 siblings, 1 reply; 10+ messages in thread
From: Emily Shaffer @ 2023-05-17 18:38 UTC (permalink / raw)
  To: Git List; +Cc: michael.strawbridge, dianders

[-- Attachment #1: Type: text/plain, Size: 3675 bytes --]

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

[-- Attachment #2: gitpatches.tgz --]
[-- Type: application/x-compressed-tar, Size: 4705 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-05-18  1:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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