Skip to contentSkip to conversation

Maintainers, please git-am -m

Qemu-devel Markus Armbruster 7 participants 11 messages Feb 8, 2019 – Feb 26, 2019

lore
Share & tools
lore

Markus Armbruster

author Reviewed-by Daniel P. Berrangé Reviewed-by Philippe Mathieu-Daudé Tested-by Philippe Mathieu-Daudé Acked-by Alex Bennée
#0 lore raw

Short story: please add

[am]
messageid = true

to your .gitconfig.

Long story. git-am can add a Message-id: tag. Looks like this:

commit 335dbb5de1e98c4dc73590349f17bb2a4d72596c
Author: Thomas Huth <[email protected]>
Date: Mon Feb 4 09:25:43 2019 +0100
Commit: Peter Maydell <[email protected]>
CommitDate: Mon Feb 4 15:25:21 2019 +0000

tests/docker/test-mingw and docs: Remove --with-sdlabi=2.0

Patchew currently reports failures with the mingw docker test - this is due to --with-sdlabi=2.0 configure flag which does not exist anymore. Remove this remainder from the docker test and the docs now.

---> Message-id: [email protected]

The Message-id identifies the patch e-mail. It makes finding the review thread easier and more reliable. It's also a valid key on Patchew[*].

Sadly, not all of our commits don't carry it. Here's how top committers have been doing recently[**]:

with without
264 21 Peter Maydell <[email protected]>
65 2 Gerd Hoffmann <[email protected]>
64 0 Laurent Vivier <[email protected]>
64 0 Eric Blake <[email protected]>
62 1 Eduardo Habkost <[email protected]>
56 0 Markus Armbruster <[email protected]>
29 72 Richard Henderson <[email protected]>
24 24 Paolo Bonzini <[email protected]>
10 31 Marcel Apfelbaum <[email protected]>
0 107 Kevin Wolf <[email protected]>
0 106 David Gibson <[email protected]>
0 93 Michael S. Tsirkin <[email protected]>
0 81 Aleksandar Markovic <[email protected]>
0 69 Samuel Thibault <[email protected]>
0 54 Alex Bennée <[email protected]>
0 50 Thomas Huth <[email protected]>
0 29 Anthony PERARD <[email protected]>
0 28 Marc-André Lureau <[email protected]>

Not bad, but there's room for improvement.

[*] Try https://patchew.org/search?q=id%3A1549268743-18502-1-git-send-email-thuth%40redhat.com

[**] git-log master --no-merges --pretty=fuller --since '3 months ago' | gawk '/^Commit: / { if (c) h[c][m]++; c=$0; m=0 } /^ Message-[Ii]d: / { m=1 } END { for (c in h) if (h[c][0] + h[c][1] > 25) printf "%7d %7d %s\n", h[c][1], h[c][0], substr(c,13) }' | sort -nr

#1 lore raw
Quoted 55 lines · Markus Armbruster

Short story: please add

[am]
messageid = true

to your .gitconfig.

Long story. git-am can add a Message-id: tag. Looks like this:

commit 335dbb5de1e98c4dc73590349f17bb2a4d72596c
Author: Thomas Huth <[email protected]>
Date: Mon Feb 4 09:25:43 2019 +0100
Commit: Peter Maydell <[email protected]>
CommitDate: Mon Feb 4 15:25:21 2019 +0000

tests/docker/test-mingw and docs: Remove --with-sdlabi=2.0

Patchew currently reports failures with the mingw docker test - this is due to --with-sdlabi=2.0 configure flag which does not exist anymore. Remove this remainder from the docker test and the docs now.

---> Message-id: [email protected]

The Message-id identifies the patch e-mail. It makes finding the review thread easier and more reliable. It's also a valid key on Patchew[*].

Sadly, not all of our commits don't carry it. Here's how top committers have been doing recently[**]:

with without
264 21 Peter Maydell <[email protected]>
65 2 Gerd Hoffmann <[email protected]>
64 0 Laurent Vivier <[email protected]>
64 0 Eric Blake <[email protected]>
62 1 Eduardo Habkost <[email protected]>
56 0 Markus Armbruster <[email protected]>
29 72 Richard Henderson <[email protected]>
24 24 Paolo Bonzini <[email protected]>
10 31 Marcel Apfelbaum <[email protected]>
0 107 Kevin Wolf <[email protected]>
0 106 David Gibson <[email protected]>
0 93 Michael S. Tsirkin <[email protected]>
0 81 Aleksandar Markovic <[email protected]>
0 69 Samuel Thibault <[email protected]>
0 54 Alex Bennée <[email protected]>
0 50 Thomas Huth <[email protected]>
0 29 Anthony PERARD <[email protected]>
0 28 Marc-André Lureau <[email protected]>

Quoted 1 line

Not bad, but there's room for improvement.

I'd like to, but I can't. I'm still using git 1.8 and the -m parameter is not supported there yet.

Thomas

#2 lore raw

Hi,

Quoted 2 lines
Quoted 2 lines

with without
65 2 Gerd Hoffmann <[email protected]>

Oops. Two slipped through:(

Quoted 2 lines

I'd like to, but I can't. I'm still using git 1.8 and the -m parameter is not supported there yet.

rhel-7 software collection has newer git (2.9) available.

HTH,
Gerd

#3 lore raw
In reply to Markus Armbruster
Quoted 26 lines · On Fri, 08 Feb 2019 08:30:11 +0100 Markus Armbruster <[email protected]> wrote:

Short story: please add

[am]
messageid = true

to your .gitconfig.

Long story. git-am can add a Message-id: tag. Looks like this:

commit 335dbb5de1e98c4dc73590349f17bb2a4d72596c
Author: Thomas Huth <[email protected]>
Date: Mon Feb 4 09:25:43 2019 +0100
Commit: Peter Maydell <[email protected]>
CommitDate: Mon Feb 4 15:25:21 2019 +0000

tests/docker/test-mingw and docs: Remove --with-sdlabi=2.0

Patchew currently reports failures with the mingw docker test - this is due to --with-sdlabi=2.0 configure flag which does not exist anymore. Remove this remainder from the docker test and the docs now.

Quoted 5 lines

---> Message-id: [email protected]

The Message-id identifies the patch e-mail. It makes finding the review thread easier and more reliable. It's also a valid key on Patchew[*].

I'm using it for anything I git am, but I'm usually not git am'ing my own patches (I just merge from the branch I have them on). Is the message id valuable enough to warrant the extra round-trip for patches that are committed by the authors themselves?

[I can't say I've used it much myself, if at all.]

#4 lore raw
Quoted 32 lines · Cornelia Huck
Quoted 29 lines · On Fri, 08 Feb 2019 08:30:11 +0100 Markus Armbruster <[email protected]> wrote:

Short story: please add

[am]
messageid = true

to your .gitconfig.

Long story. git-am can add a Message-id: tag. Looks like this:

commit 335dbb5de1e98c4dc73590349f17bb2a4d72596c
Author: Thomas Huth <[email protected]>
Date: Mon Feb 4 09:25:43 2019 +0100
Commit: Peter Maydell <[email protected]>
CommitDate: Mon Feb 4 15:25:21 2019 +0000

tests/docker/test-mingw and docs: Remove --with-sdlabi=2.0

Patchew currently reports failures with the mingw docker test - this is due to --with-sdlabi=2.0 configure flag which does not exist anymore. Remove this remainder from the docker test and the docs now.

---> Message-id: [email protected]

Quoted 7 lines
Quoted 2 lines

The Message-id identifies the patch e-mail. It makes finding the review thread easier and more reliable. It's also a valid key on Patchew[*].

I'm using it for anything I git am, but I'm usually not git am'ing my own patches (I just merge from the branch I have them on). Is the message id valuable enough to warrant the extra round-trip for patches that are committed by the authors themselves?

I typically do that, using Stefan's "patches" tool, to automatically collect Reviewed-by: lines from replies. And that adds the message id too.

cheers,
Gerd

#5 lore raw
In reply to Markus Armbruster
Quoted 26 lines · Markus Armbruster

Short story: please add

[am]
messageid = true

to your .gitconfig.

Long story. git-am can add a Message-id: tag. Looks like this:

commit 335dbb5de1e98c4dc73590349f17bb2a4d72596c
Author: Thomas Huth <[email protected]>
Date: Mon Feb 4 09:25:43 2019 +0100
Commit: Peter Maydell <[email protected]>
CommitDate: Mon Feb 4 15:25:21 2019 +0000

tests/docker/test-mingw and docs: Remove --with-sdlabi=2.0

Patchew currently reports failures with the mingw docker test - this is due to --with-sdlabi=2.0 configure flag which does not exist anymore. Remove this remainder from the docker test and the docs now.

Quoted 5 lines

---> Message-id: [email protected]

The Message-id identifies the patch e-mail. It makes finding the review thread easier and more reliable. It's also a valid key on Patchew[*].

It is sometimes confusing however, see:
https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg01992.html

We have:

Message-Id: <[email protected]>

This is probably a special case, and eventually a Patchew limitation, but I first wondered who wrote this patch? Since the Message-Id is from Yang Zhong, is the Signed-off-by tag incorrect?
Then I went thru the previous version and understood the author is indeed Paolo, but his patch was first sent by Yang Zhong, then he applied his own patch sent by Yang.

And yet this isn't a pull request but a simple patch, so the Message-Id might not be very relevant there.

Quoted 2 lines

Sadly, not all of our commits don't carry it. Here's how top committers

'committers' -> 'maintainers'?

(Actually committers don't know their patch Message-Id before sending the patch).

Quoted 29 lines

have been doing recently[**]:

with without
264 21 Peter Maydell <[email protected]>
65 2 Gerd Hoffmann <[email protected]>
64 0 Laurent Vivier <[email protected]>
64 0 Eric Blake <[email protected]>
62 1 Eduardo Habkost <[email protected]>
56 0 Markus Armbruster <[email protected]>
29 72 Richard Henderson <[email protected]>
24 24 Paolo Bonzini <[email protected]>
10 31 Marcel Apfelbaum <[email protected]>
0 107 Kevin Wolf <[email protected]>
0 106 David Gibson <[email protected]>
0 93 Michael S. Tsirkin <[email protected]>
0 81 Aleksandar Markovic <[email protected]>
0 69 Samuel Thibault <[email protected]>
0 54 Alex Bennée <[email protected]>
0 50 Thomas Huth <[email protected]>
0 29 Anthony PERARD <[email protected]>
0 28 Marc-André Lureau <[email protected]>

Not bad, but there's room for improvement.

[*] Try https://patchew.org/search?q=id%3A1549268743-18502-1-git-send-email-thuth%40redhat.com

[**] git-log master --no-merges --pretty=fuller --since '3 months ago' | gawk '/^Commit: / { if (c) h[c][m]++; c=$0; m=0 } /^ Message-[Ii]d: / { m=1 } END { for (c in h) if (h[c][0] + h[c][1] > 25) printf "%7d %7d %s\n", h[c][1], h[c][0], substr(c,13) }' | sort -nr

#6 lore raw
Quoted 49 lines · Philippe Mathieu-Daudé
Quoted 26 lines · Markus Armbruster

Short story: please add

[am]
messageid = true

to your .gitconfig.

Long story. git-am can add a Message-id: tag. Looks like this:

commit 335dbb5de1e98c4dc73590349f17bb2a4d72596c
Author: Thomas Huth <[email protected]>
Date: Mon Feb 4 09:25:43 2019 +0100
Commit: Peter Maydell <[email protected]>
CommitDate: Mon Feb 4 15:25:21 2019 +0000

tests/docker/test-mingw and docs: Remove --with-sdlabi=2.0

Patchew currently reports failures with the mingw docker test - this is due to --with-sdlabi=2.0 configure flag which does not exist anymore. Remove this remainder from the docker test and the docs now.

Quoted 5 lines

---> Message-id: [email protected]

The Message-id identifies the patch e-mail. It makes finding the review thread easier and more reliable. It's also a valid key on Patchew[*].

It is sometimes confusing however, see:
https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg01992.html

We have:

Message-Id: <[email protected]>

This is probably a special case, and eventually a Patchew limitation, but I first wondered who wrote this patch? Since the Message-Id is from Yang Zhong, is the Signed-off-by tag incorrect?
Then I went thru the previous version and understood the author is indeed Paolo, but his patch was first sent by Yang Zhong, then he applied his own patch sent by Yang.

Quoted 2 lines

And yet this isn't a pull request but a simple patch, so the Message-Id might not be very relevant there.

git-am appears to add a Message-Id only if none is present.

Ideally, people don't submit patches with Message-Id, and maintainers do use git-am -m. Given how losely we enforce our process, we're bound to deviate from the ideal, just like for other patch submission details. All I'm asking for is a best effort.

Quoted 6 lines
Quoted 1 line

Sadly, not all of our commits don't carry it. Here's how top committers

'committers' -> 'maintainers'?

(Actually committers don't know their patch Message-Id before sending the patch).

I used "committers" in the sense of "whoever git-log shows in the "Commit:" line. I agree these are maintainers in our work flow. Calling them maintainers would've been clearer.

Quoted 29 lines
Quoted 29 lines

have been doing recently[**]:

with without
264 21 Peter Maydell <[email protected]>
65 2 Gerd Hoffmann <[email protected]>
64 0 Laurent Vivier <[email protected]>
64 0 Eric Blake <[email protected]>
62 1 Eduardo Habkost <[email protected]>
56 0 Markus Armbruster <[email protected]>
29 72 Richard Henderson <[email protected]>
24 24 Paolo Bonzini <[email protected]>
10 31 Marcel Apfelbaum <[email protected]>
0 107 Kevin Wolf <[email protected]>
0 106 David Gibson <[email protected]>
0 93 Michael S. Tsirkin <[email protected]>
0 81 Aleksandar Markovic <[email protected]>
0 69 Samuel Thibault <[email protected]>
0 54 Alex Bennée <[email protected]>
0 50 Thomas Huth <[email protected]>
0 29 Anthony PERARD <[email protected]>
0 28 Marc-André Lureau <[email protected]>

Not bad, but there's room for improvement.

[*] Try https://patchew.org/search?q=id%3A1549268743-18502-1-git-send-email-thuth%40redhat.com

[**] git-log master --no-merges --pretty=fuller --since '3 months ago' | gawk '/^Commit: / { if (c) h[c][m]++; c=$0; m=0 } /^ Message-[Ii]d: / { m=1 } END { for (c in h) if (h[c][0] + h[c][1] > 25) printf "%7d %7d %s\n", h[c][1], h[c][0], substr(c,13) }' | sort -nr

#7 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 2 lines · Philippe Mathieu-Daudé

And yet this isn't a pull request but a simple patch, so the Message-Id might not be very relevant there.

Yes, I agree that Message-Id is not that relevant if you're taking a patch from someone else and then reposting it. But it's a relatively rare case when >1 people are collaborating on revisions of a series.

Paolo

#8 lore raw
In reply to Markus Armbruster
Quoted 16 lines · Markus Armbruster

Short story: please add

[am]
messageid = true

to your .gitconfig.

Long story. git-am can add a Message-id: tag. Looks like this:

Quoted 5 lines

---> Message-id: [email protected]

The Message-id identifies the patch e-mail. It makes finding the review thread easier and more reliable. It's also a valid key on Patchew[*].

I find the tag valuable enough in later git searches that I don't mind feeding my own patches back through the mailing list to add it (patchew helps with that, of course). But for it to become mandatory, we'd need to enhance scripts/checkpatch.pl to enforce it.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org
#9 lore raw
Quoted 20 lines · Eric Blake
Quoted 19 lines · Markus Armbruster

Short story: please add

[am]
messageid = true

to your .gitconfig.

Long story. git-am can add a Message-id: tag. Looks like this:

---> Message-id: [email protected]

Quoted 7 lines
Quoted 2 lines

The Message-id identifies the patch e-mail. It makes finding the review thread easier and more reliable. It's also a valid key on Patchew[*].

I find the tag valuable enough in later git searches that I don't mind feeding my own patches back through the mailing list to add it (patchew helps with that, of course). But for it to become mandatory, we'd need to enhance scripts/checkpatch.pl to enforce it.

I'm afraid checkpatch is the wrong place. When you submit v1 patches for review, there is no Message-id. Even for respins, we don't want one. It should be added when patches get applied for real, so the commit carries exactly one Message-id, and it refers back to the final version on the list.

Two ideas:

* Have Patchew flag pull requests lacking Message-id

* Admittedly vague: some kind of git pre merge hook magic to make git-merge flag missing Message-id

#10 lore raw
Quoted 8 lines · Markus Armbruster
Quoted 7 lines
Quoted 2 lines

The Message-id identifies the patch e-mail. It makes finding the review thread easier and more reliable. It's also a valid key on Patchew[*].

I find the tag valuable enough in later git searches that I don't mind feeding my own patches back through the mailing list to add it (patchew helps with that, of course). But for it to become mandatory, we'd need to enhance scripts/checkpatch.pl to enforce it.

Quoted 5 lines

I'm afraid checkpatch is the wrong place. When you submit v1 patches for review, there is no Message-id. Even for respins, we don't want one. It should be added when patches get applied for real, so the commit carries exactly one Message-id, and it refers back to the final version on the list.

Indeed, I wasn't thinking about how it would work. checkpatch.pl can filter for 'PULL' being in a subject line, as that will not affect normal submissions, but there is no guarantee that it will mesh with the workflows of the various maintainers.

Quoted 4 lines

Two ideas:

* Have Patchew flag pull requests lacking Message-id

Yes, that works, as well as patching Peter's sanity-checking script to do likewise.

Quoted 3 lines

* Admittedly vague: some kind of git pre merge hook magic to make git-merge flag missing Message-id

I'm not sure if Peter has his sanity-checker script plugged in via git hooks or some other way.

https://git.linaro.org/people/peter.maydell/misc-scripts.git/

if someone wants to propose a patch to it.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org