Create 'Reported:' and 'Reviewed:' tags for links in commit messages
Subsystems (2)
cover Create 'Reported:' and 'Reviewed:' tags for links in commit messages
The following patch proposes to create two new tags for mentioning links in commit messages. They are meant to make it obvious what provided links are about, which is useful for both users and scripts studying commits.
The new tag 'Reported:' is meant to be used for linking to bug reports, while 'Reviewed:' should point to the last review of the patch in question. They supplement 'Link:', which until now has been used for these two as well as other purposes; it stays around for the latter use case, for example for links to PDFs or webpages with background information relevant for the patch.
This submission partly got indirectly triggered by regzbot, my Linux kernel regression tracking bot (https://linux-regtracking.leemhuis.info/regzbot/ ). It automatically marks a tracked regression as resolved when it notices a commit with a 'Link:' pointing to the report of the tracked regression. In preparation for this I recently improved the kernel's documentation on 'Link:' to the best of my understanding in commit 1f57bd42b77c
(https://git.kernel.org/linus/1f57bd42b77c ). I also started pointing out that usage to various people when I noticed the links were missing. Some didn't know that 'Link:' was supposed to be like this, while developers from the DRM subsystem were using 'References:' instead; some developer also simply used footnotes style and there are also quite a few developers unaware they are supposed to add links to bug reports.
I could continue down that path and further educating developers, no big deal. But I wondered if I was making a problem worse, as I always found it a bit confusing that 'Link:' is used for different purposes and thus ambiguous. The situation thus made me wonder if this wouldn't be a good time to improve the whole situation by going a step further. That's how the proposed patch (still a bit rough) came to light.
Obviously such a change will force developers and maintainers to adjust, so it's nothing that should be done lighthearted. But I guess in the long-run it's worth it. And for 'Review:' the conversion shouldn't be much work for people, as many just need to update their git am hook or switch to a hypothetical new version of b4 that was adjusted to place 'Reviewed:' tags instead of 'Link:'. It's a bit more of a hassle when it comes to 'Reported:', as some people will need to update their muscle memory. But the similarity to the 'Reported-by:' tag (to be used in the same situation) should help here; and quite a bit of education in this area is needed anyway (see above).
In both use cases there is no real harm done if it takes the world a while to adapt, as 'Link:' stays around.
I won't mind at all if this bold move gets rejected, if that's the case I'll simply modify the patch a bit to properly describe the 'Link:' tag in Documentation/process/5.Posting.rst, as it's not mentioning it at all right now. But I think proposing this was worth a shot, as having distant tags for various types of links might be handy for other purposes in the long-run as well.
Ciao, Thorsten
P.S.: I'm sending v1/RFC to workflows list and LKML only to test the waters and hopefully collect some supportive arguments. If this doesn't get shot down there I'll post a v2/RFC to wider audience including Linus and Greg; not sure yet if I'll to Cc ksummit then as well, as it would be abusing the list somewhat, but OTOH is a good way to reach a lot of core people that might care about this.
Thorsten Leemhuis (1):
docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
Documentation/maintainer/configure-git.rst | 6 +-- Documentation/process/5.Posting.rst | 54 ++++++++++++++------ Documentation/process/submitting-patches.rst | 22 ++++---- 3 files changed, 53 insertions(+), 29 deletions(-)
base-commit: b96ff02ab2be1791248237b1bf318aaf62e8b701
Signature · 1 line
2.31.1
RFC PATCH 1/1 docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
Introduce the tags 'Reported:' and 'Reviewed:' in addition to 'Link:', as the latter is overloaded and hence doesn't indicate what the provided URL is about. Documenting these also provides clarity, as a few developers have used 'References:' to point to problem reports; nevertheless 'Reported:' was chosen for this purpose, as it perfectly matches up with the 'Reported-by:' tag commonly used already and needed in this situation already.
To: [email protected]
---
v1/RFC:
- first, *rough version* to see how this idea is received in the community
--- Documentation/maintainer/configure-git.rst | 6 +-- Documentation/process/5.Posting.rst | 54 ++++++++++++++------ Documentation/process/submitting-patches.rst | 22 ++++---- 3 files changed, 53 insertions(+), 29 deletions(-)
Documentation/maintainer/configure-git.rst +3 -3
@@ -40,12 +40,12 @@ Creating commit links to lore.kernel.org The web site http://lore.kernel.org is meant as a grand archive of all mail list traffic concerning or influencing the kernel development. Storing archives of patches here is a recommended practice, and when a maintainer applies a -patch to a subsystem tree, it is a good idea to provide a Link: tag with a +patch to a subsystem tree, it is a good idea to provide a Reviewed: tag with a reference back to the lore archive so that people that browse the commit history can find related discussions and rationale behind a certain change. The link tag will look like this: - Link: https://lore.kernel.org/r/<message-id> + Reviewed: https://lore.kernel.org/r/<message-id> This can be configured to happen automatically any time you issue ``git am`` by adding the following hook into your git:
@@ -56,7 +56,7 @@ by adding the following hook into your git: $ cat >.git/hooks/applypatch-msg <<'EOF' #!/bin/sh . git-sh-setup - perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1" + perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Reviewed: https://lore.kernel.org/r/$1|g;' "$1" test -x "$GIT_DIR/hooks/commit-msg" && exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} :
Documentation/process/5.Posting.rst +38 -16
91 lines not on this page · raw message
Documentation/process/submitting-patches.rst +12 -10
@@ -112,20 +112,22 @@ collisions with shorter IDs a real possibility. Bear in mind that, even if there is no collision with your six-character ID now, that condition may change five years from now. -If related discussions or any other background information behind the change -can be found on the web, add 'Link:' tags pointing to it. In case your patch -fixes a bug, for example, add a tag with a URL referencing the report in the -mailing list archives or a bug tracker; if the patch is a result of some -earlier mailing list discussion or something documented on the web, point to -it. +Add tags linking to any related discussions or background information behind +the change on the web. For example, if your patch fixes a bug, add a +`Reported:` tag pointing to the report in the mailing list archives or a bug +tracker:: -When linking to mailing list archives, preferably use the lore.kernel.org -message archiver service. To create the link URL, use the contents of the -``Message-Id`` header of the message without the surrounding angle brackets. -For example:: + Reported: https://lore.kernel.org/r/[email protected]/ + +If the patch is a related to some earlier mailing list discussion or something +documented on the web, point to it using a `Link:` tag:: Link: https://lore.kernel.org/r/[email protected]/ +When linking to mailing list archives, preferably use the lore.kernel.org +message archiver service. To create the link URL, use the contents of the +``Message-Id`` header of the message without the surrounding angle brackets, +e.g. "[email protected]" in the two examples above. Please check the link to make sure that it is actually working and points to the relevant message.
Signature · 1 line
2.31.1
Quoted 9 lines · Thorsten Leemhuis
The following patch proposes to create two new tags for mentioning links in commit messages. They are meant to make it obvious what provided links are about, which is useful for both users and scripts studying commits.
The new tag 'Reported:' is meant to be used for linking to bug reports, while 'Reviewed:' should point to the last review of the patch in question. They supplement 'Link:', which until now has been used for these two as well as other purposes; it stays around for the latter use case, for example for links to PDFs or webpages with background information relevant for the patch.
As an alternative, I can offer that we continue to use Link: trailers with extra data following the hashtag, as is already done for other trailers:
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215101 #report Link: https://lore.kernel.org/r/fobarbaz.5551212@localhost #review
Note, that this merely for completeness, not in opposition to the proposal. I find the "Link:" trailer to be semantically redundant, since what follows is already clearly a hyperlink. Adding "Link: " in front of it is only necessary for consistency and machine parsing reasons.
Regards,
-K
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
In reply to Thorsten LeemhuisQuoted 7 lines · On Mon, 22 Nov 2021 08:33:42 +0100 Thorsten Leemhuis <[email protected]>…
Introduce the tags 'Reported:' and 'Reviewed:' in addition to 'Link:', as the latter is overloaded and hence doesn't indicate what the provided URL is about. Documenting these also provides clarity, as a few developers have used 'References:' to point to problem reports; nevertheless 'Reported:' was chosen for this purpose, as it perfectly matches up with the 'Reported-by:' tag commonly used already and needed in this situation already.
I like the differences between "Reorted:" and "Reviewed:", although I may keep the "Link" instead of Reviewed because my automate scripts just give the link of the patch, and there's seldom a review attached to it :-/
That said, I would like a way to have versions show a link to the last version that was reviewed.
v1: has no tags
v2: has a Reviewed: tag to v1.
v3: has a Reviewed: tag to v2
[...]
Then the final commit could have a "Link" or "Reviewed" tag to v3, even though there may not be any reviews to v3, but v3 has the link to v2, and v2 has the link to v1, etc.
-- Steve
Quoted 10 lines · On Mon, 22 Nov 2021 10:12:33 -0500 Konstantin Ryabitsev…
As an alternative, I can offer that we continue to use Link: trailers with extra data following the hashtag, as is already done for other trailers:
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215101 #report Link: https://lore.kernel.org/r/fobarbaz.5551212@localhost #reviewNote, that this merely for completeness, not in opposition to the proposal. I find the "Link:" trailer to be semantically redundant, since what follows is already clearly a hyperlink. Adding "Link: " in front of it is only necessary for consistency and machine parsing reasons.
Machine parsing is the main reason for the Link: tag. I have scripts that key off of that tag and ignore any other "http" reference.
Perhaps the above is better, as it means we don't need to update our scripts for that parsing.
-- Steve
Quoted 10 lines · Steven Rostedt
Quoted 7 lines · On Mon, 22 Nov 2021 10:12:33 -0500 Konstantin Ryabitsev…
As an alternative, I can offer that we continue to use Link: trailers with extra data following the hashtag, as is already done for other trailers:
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215101 #report Link: https://lore.kernel.org/r/fobarbaz.5551212@localhost #reviewNote, that this merely for completeness, not in opposition to the proposal.
Thx, I'll mention those as a alternative in v2
Quoted 10 lines
Quoted 4 lines
I
find the "Link:" trailer to be semantically redundant, since what follows is already clearly a hyperlink. Adding "Link: " in front of it is only necessary for consistency and machine parsing reasons.Machine parsing is the main reason for the Link: tag. I have scripts that key off of that tag and ignore any other "http" reference.
Perhaps the above is better, as it means we don't need to update our scripts for that parsing.
Hmmm. I'm not opposed, but I wonder if 'Reported:' and 'Reviewed:' are this tiny bit easier to handle (both for placing and analyzing scripts) that makes the difference between "nice idea, but fails to be used in the field" and "after some tradition phase this becomes the new normal" in the end.
Whatever, will mention that and point to this post in the next round. Thx for the feedback!
Ciao, Thorsten
Quoted 5 lines · On Mon, 22 Nov 2021 19:40:46 +0100 Thorsten Leemhuis <[email protected]>…
Hmmm. I'm not opposed, but I wonder if 'Reported:' and 'Reviewed:' are this tiny bit easier to handle (both for placing and analyzing scripts) that makes the difference between "nice idea, but fails to be used in the field" and "after some tradition phase this becomes the new normal" in the end.
Either way is fine for me. My scripts are trivial and easy to update. I'm more worried about what other people may use.
-- Steve
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
In reply to Steven RostedtQuoted 11 lines · Steven Rostedt
Quoted 7 lines · On Mon, 22 Nov 2021 08:33:42 +0100 Thorsten Leemhuis <[email protected]>…
Introduce the tags 'Reported:' and 'Reviewed:' in addition to 'Link:', as the latter is overloaded and hence doesn't indicate what the provided URL is about. Documenting these also provides clarity, as a few developers have used 'References:' to point to problem reports; nevertheless 'Reported:' was chosen for this purpose, as it perfectly matches up with the 'Reported-by:' tag commonly used already and needed in this situation already.
Quoted 3 lines
I like the differences between "Reorted:" and "Reviewed:", although I may keep the "Link" instead of Reviewed because my automate scripts just give the link of the patch, and there's seldom a review attached to it :-/
/me wonders if "Merge Request:" would be a better tag, but at least for now settles on 'it's nice, as it's close to what people are used from git forges, but OTOH it somehow feels wrong'
Quoted 7 lines
That said, I would like a way to have versions show a link to the last version that was reviewed.
v1: has no tags
v2: has a Reviewed: tag to v1.
Quoted 7 lines
v3: has a Reviewed: tag to v2
[...]
Then the final commit could have a "Link" or "Reviewed" tag to v3, even though there may not be any reviews to v3, but v3 has the link to v2, and v2 has the link to v1, etc.
Is that really worth it? Isn't it sufficient if the commit links to the last public review posting, as that already should link to all earlier review postings. Sure, not everybody is doing this right now, but maybe just educating people to do so is better than creating something new.
Ciao, Thorsten
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
Quoted 11 lines · On Mon, 22 Nov 2021 19:50:35 +0100 Thorsten Leemhuis <[email protected]>…
Quoted 11 lines
That said, I would like a way to have versions show a link to the last version that was reviewed.
v1: has no tags
v2: has a Reviewed: tag to v1.
v3: has a Reviewed: tag to v2
[...]
Quoted 8 lines
Quoted 3 lines
Then the final commit could have a "Link" or "Reviewed" tag to v3, even though there may not be any reviews to v3, but v3 has the link to v2, and v2 has the link to v1, etc.
Is that really worth it? Isn't it sufficient if the commit links to the last public review posting, as that already should link to all earlier review postings. Sure, not everybody is doing this right now, but maybe just educating people to do so is better than creating something new.
Isn't "as that already should link to all earlier review postings" what I'm suggesting above? I haven't seen many people do that yet.
-- Steve
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
Quoted 18 lines · Steven Rostedt
Quoted 15 lines · On Mon, 22 Nov 2021 19:50:35 +0100 Thorsten Leemhuis <[email protected]>…
Quoted 14 lines
That said, I would like a way to have versions show a link to the last version that was reviewed.
v1: has no tags
v2: has a Reviewed: tag to v1.
v3: has a Reviewed: tag to v2
[...]
Then the final commit could have a "Link" or "Reviewed" tag to v3, even though there may not be any reviews to v3, but v3 has the link to v2, and v2 has the link to v1, etc.
Quoted 7 lines
Quoted 4 lines
Is that really worth it? Isn't it sufficient if the commit links to the last public review posting, as that already should link to all earlier review postings. Sure, not everybody is doing this right now, but maybe just educating people to do so is better than creating something new.
Isn't "as that already should link to all earlier review postings" what I'm suggesting above? I haven't seen many people do that yet.
Yeah, you are right, sorry, my perception was wrong.
Any maybe I got your suggestion wrong, but what you suggested sounded to me like "each patch should link to the previous submission of the patch". I just wonder if it's way easier and sufficient if just the cover letter links to the previous or all earlier submissions of the series in its revision history (sorry, I didn't should have made this more obvious in my earlier mail); for patches without a cover letter this obligation obviously would shift to the patch.
IOW: I have something in mind like in this submission:
https://lore.kernel.org/lkml/[email protected]/
Only the cover letter links to the earlier version, not the individual patches.
But I have no strong feeling here, I don't care much about this.
Ciao, Thorsten
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
In reply to Thorsten LeemhuisDocumentation/maintainer/configure-git.rst
Quoted 4 lines · Thorsten Leemhuis
Documentation/maintainer/configure-git.rst +0
-0
<snip>, +cc git@vger
Documentation/maintainer/configure-git.rst by adding the following hook into your git: · line 59
Quoted 6 lines
Documentation/maintainer/configure-git.rst +1
-1@@ -56,7 +56,7 @@ by adding the following hook into your git: $ cat >.git/hooks/applypatch-msg <<'EOF' #!/bin/sh . git-sh-setup - perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1" + perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Reviewed: https://lore.kernel.org/r/$1|g;' "$1"
Side note: that regexp should match "Message-ID" case-insensitively. git send-email is an outlier in its capitalization of "Message-Id", most RFCs capitalize it "Message-ID", as do common MUAs.
git send-email's capitalization does annoy me and I've looked into changing it; but there's a bunch of tests and probably dependent code that also need to be updated...
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
Quoted 3 lines · Eric Wong
git send-email's capitalization does annoy me and I've looked into changing it; but there's a bunch of tests and probably dependent code that also need to be updated...
It does annoy me, too, and I do not mind if it gets "fixed", but I do not know if the cost for vetting a bulk update like that is worth it. There is another one outside send-email in log-tree.c that is responsible for output from format-patch.
Here is the extent of damage in my trial change that seems to pass the tests locally.
Documentation/MyFirstContribution.txt | 14 ++++----- Documentation/git-format-patch.txt | 4 +-- Documentation/git-send-email.txt | 2 +- git-send-email.perl | 4 +-- log-tree.c | 2 +- mailinfo.c | 4 +-- t/t4014-format-patch.sh | 56 +++++++++++++++++------------------ t/t4150-am.sh | 8 ++--- t/t4258/mbox | 2 +- t/t5100/msg0002 | 2 +- t/t5100/msg0003 | 2 +- t/t5100/msg0012--message-id | 2 +- t/t5100/quoted-cr.mbox | 4 +-- t/t5100/sample.mbox | 6 ++-- t/t9001-send-email.sh | 38 ++++++++++++------------ 15 files changed, 75 insertions(+), 75 deletions(-)
Documentation/MyFirstContribution.txt +7 -7
@@ -1071,21 +1071,21 @@ between your last version and now, if it's something significant. You do not need the exact same body in your second cover letter; focus on explaining to reviewers the changes you've made that may not be as visible. -You will also need to go and find the Message-Id of your previous cover letter. +You will also need to go and find the Message-ID of your previous cover letter. You can either note it when you send the first series, from the output of `git send-email`, or you can look it up on the https://lore.kernel.org/git[mailing list]. Find your cover letter in the -archives, click on it, then click "permalink" or "raw" to reveal the Message-Id +archives, click on it, then click "permalink" or "raw" to reveal the Message-ID header. It should match: ---- -Message-Id: <[email protected]> +Message-ID: <[email protected]> ---- -Your Message-Id is `<[email protected]>`. This example will be used -below as well; make sure to replace it with the correct Message-Id for your -**previous cover letter** - that is, if you're sending v2, use the Message-Id -from v1; if you're sending v3, use the Message-Id from v2. +Your Message-ID is `<[email protected]>`. This example will be used +below as well; make sure to replace it with the correct Message-ID for your +**previous cover letter** - that is, if you're sending v2, use the Message-ID +from v1; if you're sending v3, use the Message-ID from v2. While you're looking at the email, you should also note who is CC'd, as it's common practice in the mailing list to keep all CCs on a thread. You can add
Documentation/git-format-patch.txt +2 -2
@@ -99,7 +99,7 @@ To omit patch numbers from the subject, use `-N`. If given `--thread`, `git-format-patch` will generate `In-Reply-To` and `References` headers to make the second and subsequent patch mails appear -as replies to the first mail; this also generates a `Message-Id` header to +as replies to the first mail; this also generates a `Message-ID` header to reference. OPTIONS
@@ -163,7 +163,7 @@ include::diff-options.txt[] --no-thread:: Controls addition of `In-Reply-To` and `References` headers to make the second and subsequent mails appear as replies to the - first. Also controls generation of the `Message-Id` header to + first. Also controls generation of the `Message-ID` header to reference. + The optional <style> argument can be either `shallow` or `deep`.
Documentation/git-send-email.txt +1 -1
@@ -91,7 +91,7 @@ See the CONFIGURATION section for `sendemail.multiEdit`. --in-reply-to=<identifier>:: Make the first mail (or all the mails with `--no-thread`) appear as a - reply to the given Message-Id, which avoids breaking threads to + reply to the given Message-ID, which avoids breaking threads to provide a new patch series. The second and subsequent emails will be sent as replies according to the `--[no-]chain-reply-to` setting.
git-send-email.perl +2 -2
@@ -1494,7 +1494,7 @@ sub send_message { To: $to${ccline} Subject: $subject Date: $date -Message-Id: $message_id +Message-ID: $message_id "; if ($use_xmailer) { $header .= "X-Mailer: git-send-email $gitversion\n";
@@ -1789,7 +1789,7 @@ sub process_file { $has_mime_version = 1; push @xh, $_; } - elsif (/^Message-Id: (.*)/i) { + elsif (/^Message-ID: (.*)/i) { $message_id = $1; } elsif (/^Content-Transfer-Encoding: (.*)/i) {
log-tree.c +1 -1
@@ -428,7 +428,7 @@ void log_write_email_headers(struct rev_info *opt, struct commit *commit,fprintf (opt->diffopt.file,"From %s Mon Sep 17 00:00:00 2001\n" , name);graph_show_oneline (opt->graph);if (opt->message_id) { -fprintf (opt->diffopt.file,"Message-Id: <%s>\n" , opt->message_id); +fprintf (opt->diffopt.file,"Message-ID: <%s>\n" , opt->message_id);graph_show_oneline (opt->graph); }if (opt->ref_message_ids && opt->ref_message_ids->nr >0 ) {
mailinfo.c +2 -2
@@ -597,7 +597,7 @@ static int check_header(struct mailinfo *mi, ret =1 ; goto check_header_out; } -if (parse_header (line,"Message-Id" , mi, &sb)) { +if (parse_header (line,"Message-ID" , mi, &sb)) {if (mi->add_message_id) mi->message_id =strbuf_detach (&sb,NULL ); ret =1 ;
@@ -829,7 +829,7 @@ static int handle_commit_msg(struct mailinfo *mi, struct strbuf *line)if (patchbreak (line)) {if (mi->message_id)strbuf_addf (&mi->log_message, -"Message-Id: %s\n" , mi->message_id); +"Message-ID: %s\n" , mi->message_id);return 1 ; }
t/t4014-format-patch.sh +28 -28
163 lines not on this page · raw message
t/t4150-am.sh +4 -4
@@ -103,7 +103,7 @@ test_expect_success setup ' git format-patch --stdout first >patch1 && { - echo "Message-Id: <[email protected]>" && + echo "Message-ID: <[email protected]>" && echo "X-Fake-Field: Line One" && echo "X-Fake-Field: Line Two" && echo "X-Fake-Field: Line Three" &&
@@ -916,7 +916,7 @@ test_expect_success 'am --message-id really adds the message id' ' git am --message-id patch1.eml && test_path_is_missing .git/rebase-apply && git cat-file commit HEAD | tail -n1 >actual && - grep Message-Id patch1.eml >expected && + grep Message-ID patch1.eml >expected && test_cmp expected actual '
@@ -928,7 +928,7 @@ test_expect_success 'am.messageid really adds the message id' ' git am patch1.eml && test_path_is_missing .git/rebase-apply && git cat-file commit HEAD | tail -n1 >actual && - grep Message-Id patch1.eml >expected && + grep Message-ID patch1.eml >expected && test_cmp expected actual '
@@ -939,7 +939,7 @@ test_expect_success 'am --message-id -s signs off after the message id' ' git am -s --message-id patch1.eml && test_path_is_missing .git/rebase-apply && git cat-file commit HEAD | tail -n2 | head -n1 >actual && - grep Message-Id patch1.eml >expected && + grep Message-ID patch1.eml >expected && test_cmp expected actual '
t/t4258/mbox +1 -1
@@ -2,7 +2,7 @@ From: A U Thor <[email protected]> To: [email protected] Subject: [PATCH v2] sample Date: Mon, 3 Aug 2020 22:40:55 +0700 -Message-Id: <[email protected]> +Message-ID: <[email protected]> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64
t/t5100/msg0002 +1 -1
@@ -3,7 +3,7 @@ message: From: Nit Picker <[email protected]> Subject: foo is too old -Message-Id: <[email protected]> +Message-ID: <[email protected]> Hopefully this would fix the problem stated there.
t/t5100/msg0003 +1 -1
@@ -3,7 +3,7 @@ message: From: Nit Picker <[email protected]> Subject: foo is too old -Message-Id: <[email protected]> +Message-ID: <[email protected]> Hopefully this would fix the problem stated there.
t/t5100/msg0012--message-id +1 -1
@@ -5,4 +5,4 @@ docutils заменён на python-docutils python-docutils. В то время как сам rest2web не нужен. Signed-off-by: Dmitriy Blinov <[email protected]> -Message-Id: <[email protected]> +Message-ID: <[email protected]>
t/t5100/quoted-cr.mbox +2 -2
@@ -3,7 +3,7 @@ From: A U Thor <[email protected]> To: [email protected] Subject: [PATCH v2] sample Date: Mon, 3 Aug 2020 22:40:55 +0700 -Message-Id: <[email protected]> +Message-ID: <[email protected]> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64
@@ -27,7 +27,7 @@ From: A U Thor <[email protected]> To: [email protected] Subject: [PATCH v2] sample Date: Mon, 3 Aug 2020 22:40:55 +0700 -Message-Id: <[email protected]> +Message-ID: <[email protected]> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64
t/t5100/sample.mbox +3 -3
@@ -35,7 +35,7 @@ message: From: Nit Picker <[email protected]> Subject: foo is too old -Message-Id: <[email protected]> +Message-ID: <[email protected]> Hopefully this would fix the problem stated there.
@@ -78,7 +78,7 @@ message: From: Nit Picker <[email protected]> Subject: foo is too old -Message-Id: <[email protected]> +Message-ID: <[email protected]> Hopefully this would fix the problem stated there.
@@ -508,7 +508,7 @@ From [email protected] Wed Nov 12 17:54:41 2008 From: Dmitriy Blinov <[email protected]> To: [email protected] Date: Wed, 12 Nov 2008 17:54:41 +0300 -Message-Id: <[email protected]> +Message-ID: <[email protected]> X-Mailer: git-send-email 1.5.6.5 MIME-Version: 1.0 Content-Type: text/plain;
t/t9001-send-email.sh +19 -19
@@ -11,7 +11,7 @@ PREREQ="PERL" replace_variable_fields () { sed -e "s/^\(Date:\).*/\1 DATE-STRING/" \ - -e "s/^\(Message-Id:\).*/\1 MESSAGE-ID-STRING/" \ + -e "s/^\(Message-ID:\).*/\1 MESSAGE-ID-STRING/" \ -e "s/^\(X-Mailer:\).*/\1 X-MAILER-STRING/" }
@@ -224,7 +224,7 @@ Cc: [email protected], [email protected] Subject: [PATCH 1/1] Second. Date: DATE-STRING -Message-Id: MESSAGE-ID-STRING +Message-ID: MESSAGE-ID-STRING X-Mailer: X-MAILER-STRING In-Reply-To: <[email protected]> References: <[email protected]>
@@ -616,7 +616,7 @@ test_expect_success $PREREQ 'In-Reply-To without --chain-reply-to' ' sed -n -e "s/^In-Reply-To: *\(.*\)/\1/p" msgtxt1 >actual && test_cmp expect actual && # Second and subsequent messages are replies to the first one - sed -n -e "s/^Message-Id: *\(.*\)/\1/p" msgtxt1 >expect && + sed -n -e "s/^Message-ID: *\(.*\)/\1/p" msgtxt1 >expect && sed -n -e "s/^In-Reply-To: *\(.*\)/\1/p" msgtxt2 >actual && test_cmp expect actual && sed -n -e "s/^In-Reply-To: *\(.*\)/\1/p" msgtxt3 >actual &&
@@ -636,10 +636,10 @@ test_expect_success $PREREQ 'In-Reply-To with --chain-reply-to' ' 2>errors && sed -n -e "s/^In-Reply-To: *\(.*\)/\1/p" msgtxt1 >actual && test_cmp expect actual && - sed -n -e "s/^Message-Id: *\(.*\)/\1/p" msgtxt1 >expect && + sed -n -e "s/^Message-ID: *\(.*\)/\1/p" msgtxt1 >expect && sed -n -e "s/^In-Reply-To: *\(.*\)/\1/p" msgtxt2 >actual && test_cmp expect actual && - sed -n -e "s/^Message-Id: *\(.*\)/\1/p" msgtxt2 >expect && + sed -n -e "s/^Message-ID: *\(.*\)/\1/p" msgtxt2 >expect && sed -n -e "s/^In-Reply-To: *\(.*\)/\1/p" msgtxt3 >actual && test_cmp expect actual '
@@ -712,7 +712,7 @@ Cc: [email protected], [email protected] Subject: [PATCH 1/1] Second. Date: DATE-STRING -Message-Id: MESSAGE-ID-STRING +Message-ID: MESSAGE-ID-STRING X-Mailer: X-MAILER-STRING MIME-Version: 1.0 Content-Transfer-Encoding: 8bit
@@ -758,7 +758,7 @@ Cc: A <[email protected]>, [email protected] Subject: [PATCH 1/1] Second. Date: DATE-STRING -Message-Id: MESSAGE-ID-STRING +Message-ID: MESSAGE-ID-STRING X-Mailer: X-MAILER-STRING MIME-Version: 1.0 Content-Transfer-Encoding: 8bit
@@ -795,7 +795,7 @@ Cc: A <[email protected]>, C O Mitter <[email protected]> Subject: [PATCH 1/1] Second. Date: DATE-STRING -Message-Id: MESSAGE-ID-STRING +Message-ID: MESSAGE-ID-STRING X-Mailer: X-MAILER-STRING MIME-Version: 1.0 Content-Transfer-Encoding: 8bit
@@ -823,7 +823,7 @@ From: Example <[email protected]> To: [email protected] Subject: [PATCH 1/1] Second. Date: DATE-STRING -Message-Id: MESSAGE-ID-STRING +Message-ID: MESSAGE-ID-STRING X-Mailer: X-MAILER-STRING MIME-Version: 1.0 Content-Transfer-Encoding: 8bit
@@ -859,7 +859,7 @@ Cc: A <[email protected]>, [email protected] Subject: [PATCH 1/1] Second. Date: DATE-STRING -Message-Id: MESSAGE-ID-STRING +Message-ID: MESSAGE-ID-STRING X-Mailer: X-MAILER-STRING MIME-Version: 1.0 Content-Transfer-Encoding: 8bit
@@ -892,7 +892,7 @@ Cc: A <[email protected]>, [email protected] Subject: [PATCH 1/1] Second. Date: DATE-STRING -Message-Id: MESSAGE-ID-STRING +Message-ID: MESSAGE-ID-STRING X-Mailer: X-MAILER-STRING MIME-Version: 1.0 Content-Transfer-Encoding: 8bit
@@ -925,7 +925,7 @@ Cc: A <[email protected]>, [email protected] Subject: [PATCH 1/1] Second. Date: DATE-STRING -Message-Id: MESSAGE-ID-STRING +Message-ID: MESSAGE-ID-STRING X-Mailer: X-MAILER-STRING MIME-Version: 1.0 Content-Transfer-Encoding: 8bit
@@ -962,7 +962,7 @@ Cc: A <[email protected]>, C O Mitter <[email protected]> Subject: [PATCH 1/1] Second. Date: DATE-STRING -Message-Id: MESSAGE-ID-STRING +Message-ID: MESSAGE-ID-STRING X-Mailer: X-MAILER-STRING MIME-Version: 1.0 Content-Transfer-Encoding: 8bit
@@ -992,7 +992,7 @@ Cc: A <[email protected]>, C O Mitter <[email protected]> Subject: [PATCH 1/1] Second. Date: DATE-STRING -Message-Id: MESSAGE-ID-STRING +Message-ID: MESSAGE-ID-STRING X-Mailer: X-MAILER-STRING MIME-Version: 1.0 Content-Transfer-Encoding: 8bit
@@ -1477,7 +1477,7 @@ test_expect_success $PREREQ 'To headers from files reset each patch' ' test_expect_success $PREREQ 'setup expect' ' cat >email-using-8bit <<\EOF From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001 -Message-Id: <[email protected]> +Message-ID: <[email protected]> From: [email protected] Date: Sat, 12 Jun 2010 15:53:58 +0200 Subject: subject goes here
@@ -1563,7 +1563,7 @@ test_expect_success $PREREQ '--8bit-encoding overrides sendemail.8bitEncoding' ' test_expect_success $PREREQ 'setup expect' ' cat >email-using-8bit <<-\EOF From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001 - Message-Id: <[email protected]> + Message-ID: <[email protected]> From: [email protected] Date: Sat, 12 Jun 2010 15:53:58 +0200 Subject: Dieser Betreff enthält auch einen Umlaut!
@@ -1592,7 +1592,7 @@ test_expect_success $PREREQ '--8bit-encoding also treats subject' ' test_expect_success $PREREQ 'setup expect' ' cat >email-using-8bit <<-\EOF From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001 - Message-Id: <[email protected]> + Message-ID: <[email protected]> From: A U Thor <[email protected]> Date: Sat, 12 Jun 2010 15:53:58 +0200 Content-Type: text/plain; charset=UTF-8
@@ -1673,7 +1673,7 @@ test_expect_success $PREREQ '8-bit and sendemail.transferencoding=base64' ' test_expect_success $PREREQ 'setup expect' ' cat >email-using-qp <<-\EOF From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001 - Message-Id: <[email protected]> + Message-ID: <[email protected]> From: A U Thor <[email protected]> Date: Sat, 12 Jun 2010 15:53:58 +0200 MIME-Version: 1.0
@@ -1699,7 +1699,7 @@ test_expect_success $PREREQ 'convert from quoted-printable to base64' ' test_expect_success $PREREQ 'setup expect' " tr -d '\\015' | tr '%' '\\015' >email-using-crlf <<EOF From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001 -Message-Id: <[email protected]> +Message-ID: <[email protected]> From: A U Thor <[email protected]> Date: Sat, 12 Jun 2010 15:53:58 +0200 Content-Type: text/plain; charset=UTF-8
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
In reply to Eric WongQuoted 19 lines · Eric Wong
Documentation/maintainer/configure-git.rst
Quoted 4 lines · Thorsten Leemhuis
Documentation/maintainer/configure-git.rst +0
-0<snip>, +cc git@vger
Documentation/maintainer/configure-git.rst by adding the following hook into your git: · line 59
Quoted 6 lines
Documentation/maintainer/configure-git.rst +1
-1@@ -56,7 +56,7 @@ by adding the following hook into your git: $ cat >.git/hooks/applypatch-msg <<'EOF' #!/bin/sh . git-sh-setup - perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1" + perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Reviewed: https://lore.kernel.org/r/$1|g;' "$1"Side note: that regexp should match "Message-ID" case-insensitively. git send-email is an outlier in its capitalization of "Message-Id", most RFCs capitalize it "Message-ID", as do common MUAs.
Quoted 3 lines
git send-email's capitalization does annoy me and I've looked into changing it; but there's a bunch of tests and probably dependent code that also need to be updated...
"git format-patch" does it without send-email, but I see that send-email will then parse its output, and would turn any capitalization into the "Message-Id" form again.
We could probably just have it preserve whatever capitalization it finds if there's an existing header, we wouldn't fix anything, but we'd move the blame around a bit :)
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
In reply to Junio C HamanoQuoted 10 lines · Junio C Hamano
Quoted 3 lines · Eric Wong
git send-email's capitalization does annoy me and I've looked into changing it; but there's a bunch of tests and probably dependent code that also need to be updated...
It does annoy me, too, and I do not mind if it gets "fixed", but I do not know if the cost for vetting a bulk update like that is worth it. There is another one outside send-email in
log-tree.cthat is responsible for output from format-patch.
I support updating the documentation in git, first; then perhaps making tests case-insensitive (which could be a complex change...).
Unfortunately, changing the send-email + log-tree.c code would break existing users of the applypatch-msg hook sample in linux/Documentation/maintainer/configure-git.rst which has been case-sensitive for around for 2 years:
https://lore.kernel.org/r/[email protected]
:<
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
In reply to Eric WongCcing Linus Walleij, who added this, and Kees, who apparently came up with this originally.
Quoted 8 lines · Eric Wong
Documentation/maintainer/configure-git.rst
Quoted 4 lines · Thorsten Leemhuis
Documentation/maintainer/configure-git.rst +0
-0<snip>, +cc git@vger
Quoted 10 lines
Documentation/maintainer/configure-git.rst by adding the following hook into your git: · line 59
Quoted 6 lines
Documentation/maintainer/configure-git.rst +1
-1@@ -56,7 +56,7 @@ by adding the following hook into your git: $ cat >.git/hooks/applypatch-msg <<'EOF' #!/bin/sh . git-sh-setup - perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1" + perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Reviewed: https://lore.kernel.org/r/$1|g;' "$1"Side note: that regexp should match "Message-ID" case-insensitively. git send-email is an outlier in its capitalization of "Message-Id", most RFCs capitalize it "Message-ID", as do common MUAs.
Argh :-/
It's still totally unclear if that or a similar patch will be accepted. And even if it is: the "don't do two different things in one commit" rule might not be that strict enforced when it comes to the Linux kernel's docs, but changing this regexp as part of another patch crosses the line.
IOW: we afaics need a separate patch to make the regexp case-insensitively. Eric, do you want to submit one, as you brought it up? Or are there any other volunteers?
Ciao, Thorsten
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
In reply to Junio C HamanoQuoted 11 lines · Junio C Hamano
Quoted 3 lines · Eric Wong
git send-email's capitalization does annoy me and I've looked into changing it; but there's a bunch of tests and probably dependent code that also need to be updated...
[...]
git-send-email.perl +0
-0
git-send-email.perl sub send_message { · line 1500
Quoted 8 lines
git-send-email.perl +1
-1@@ -1494,7 +1494,7 @@ sub send_message { To: $to${ccline} Subject: $subject Date: $date -Message-Id: $message_id +Message-ID: $message_id "; if ($use_xmailer) { $header .= "X-Mailer: git-send-email $gitversion\n";
Perhaps one way to split this & make it more readable is to split this, i.e. the mesage-id's send-email itself generates & tests, usually it passes along format-patch's.
git-send-email.perl sub process_file { · line 1795
Quoted 9 lines
git-send-email.perl +1
-1@@ -1789,7 +1789,7 @@ sub process_file { $has_mime_version = 1; push @xh, $_; } - elsif (/^Message-Id: (.*)/i) { + elsif (/^Message-ID: (.*)/i) { $message_id = $1; } elsif (/^Content-Transfer-Encoding: (.*)/i) {
Not strictly needed due to the /i, maybe splitting out cosmetic changes would be better?
I also notice we have various hits for "git grep message-id", including regex checks you didn't update here.
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
In reply to Thorsten LeemhuisQuoted 31 lines · Thorsten Leemhuis
Ccing Linus Walleij, who added this, and Kees, who apparently came up with this originally.
Quoted 8 lines · Eric Wong
Documentation/maintainer/configure-git.rst
Quoted 4 lines · Thorsten Leemhuis
Documentation/maintainer/configure-git.rst +0
-0<snip>, +cc git@vger
Quoted 10 lines
Documentation/maintainer/configure-git.rst by adding the following hook into your git: · line 59
Quoted 6 lines
Documentation/maintainer/configure-git.rst +1
-1@@ -56,7 +56,7 @@ by adding the following hook into your git: $ cat >.git/hooks/applypatch-msg <<'EOF' #!/bin/sh . git-sh-setup - perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1" + perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Reviewed: https://lore.kernel.org/r/$1|g;' "$1"Side note: that regexp should match "Message-ID" case-insensitively. git send-email is an outlier in its capitalization of "Message-Id", most RFCs capitalize it "Message-ID", as do common MUAs.
Argh :-/
It's still totally unclear if that or a similar patch will be accepted. And even if it is: the "don't do two different things in one commit" rule might not be that strict enforced when it comes to the Linux kernel's docs, but changing this regexp as part of another patch crosses the line.
Quoted 3 lines
IOW: we afaics need a separate patch to make the regexp case-insensitively. Eric, do you want to submit one, as you brought it up? Or are there any other volunteers?
I suggest you turn this into a 2 patch series to avoid conflicts for a trivial change. I don't even have a kernel worktree handy at the moment (ENOSPC :x)
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
Quoted 32 lines · Eric Wong
Quoted 31 lines · Thorsten Leemhuis
Ccing Linus Walleij, who added this, and Kees, who apparently came up with this originally.
Quoted 8 lines · Eric Wong
Documentation/maintainer/configure-git.rst
Quoted 4 lines · Thorsten Leemhuis
Documentation/maintainer/configure-git.rst +0
-0<snip>, +cc git@vger
Quoted 10 lines
Documentation/maintainer/configure-git.rst by adding the following hook into your git: · line 59
Quoted 6 lines
Documentation/maintainer/configure-git.rst +1
-1@@ -56,7 +56,7 @@ by adding the following hook into your git: $ cat >.git/hooks/applypatch-msg <<'EOF' #!/bin/sh . git-sh-setup - perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1" + perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Reviewed: https://lore.kernel.org/r/$1|g;' "$1"Side note: that regexp should match "Message-ID" case-insensitively. git send-email is an outlier in its capitalization of "Message-Id", most RFCs capitalize it "Message-ID", as do common MUAs.
Argh :-/
It's still totally unclear if that or a similar patch will be accepted. And even if it is: the "don't do two different things in one commit" rule might not be that strict enforced when it comes to the Linux kernel's docs, but changing this regexp as part of another patch crosses the line.
Quoted 7 lines
Quoted 3 lines
IOW: we afaics need a separate patch to make the regexp case-insensitively. Eric, do you want to submit one, as you brought it up? Or are there any other volunteers?
I suggest you turn this into a 2 patch series to avoid conflicts for a trivial change. I don't even have a kernel worktree handy at the moment (ENOSPC :x)
:-D
Will do this in a couple of days, unless Linus or Kees speak up.
Just to be sure I'll do what you expect to be done: I assume you want to see it changed like this?
- perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1"
+ perl -pi -e 's|^Message-I[dD]:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1"
Or are there even more variants of Message-ID out there known that need to be taken into account?
Ciao, Thorsten
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
Quoted 8 lines · Thorsten Leemhuis
Just to be sure I'll do what you expect to be done: I assume you want to see it changed like this?
(quoted diff) +1
-1- perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1" + perl -pi -e 's|^Message-I[dD]:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1"Or are there even more variants of Message-ID out there known that need to be taken into account?
The entire match should be case-insensitive[1], so I'd add `i' at the end:
perl -pi -e 's|^Message-ID:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|gi;' "$1"
Fwiw, every mail and HTTP/1.x header parser I've looked at works case-insensitively. Also, I'm not sure if `g' is needed, actually...
[1] https://datatracker.ietf.org/doc/html/rfc822#section-3.4.7
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
Quoted 9 lines · Eric Wong
Documentation/maintainer/configure-git.rst by adding the following hook into your git: · line 59
Quoted 4 lines · Thorsten Leemhuis
Just to be sure I'll do what you expect to be done: I assume you want to see it changed like this?
Documentation/maintainer/configure-git.rst +0
-1- perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1"...
The entire match should be case-insensitive[1], so I'd add `i' at the end:
Quoted 4 lines
perl -pi -e 's|^Message-ID:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|gi;' "$1"Fwiw, every mail and HTTP/1.x header parser I've looked at works case-insensitively. Also, I'm not sure if `g' is needed, actually...
It is left anchored with "^" so it would be hard to match more than once on the same line ;-)
I agree that it is the right solution to make the whole thing case-insensitive by adding 'i' at the end.
FWIW, the RFC first says this:
1.2.2. Syntactic notation
This standard uses the Augmented Backus-Naur Form (ABNF) notation specified in [RFC2234] for the formal definitions of the syntax of messages. Characters will be specified either by a decimal value (e.g., the value %d65 for uppercase A and %d97 for lowercase A) or by a case-insensitive literal value enclosed in quotation marks (e.g., "A" for either uppercase or lowercase A).
and then goes on to define how message-id should look like.
3.6.4. Identification fields
message-id = "Message-ID:" msg-id CRLF
But if you go the "add /i at the end" route, you do not have to upcase "d" to "D" and that may reduce the patch noise (it only matters if the patch viewer highlights letter-by-letter changes for your recipients).
HTH
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
Quoted 37 lines · Junio C Hamano
Quoted 9 lines · Eric Wong
Review
Quoted 4 lines · Thorsten Leemhuis
Just to be sure I'll do what you expect to be done: I assume you want to see it changed like this?
(quoted diff) +0
-1- perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1"...
The entire match should be case-insensitive[1], so I'd add `i' at the end:Quoted 4 lines
perl -pi -e 's|^Message-ID:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|gi;' "$1"Fwiw, every mail and HTTP/1.x header parser I've looked at works case-insensitively. Also, I'm not sure if `g' is needed, actually...
It is left anchored with "^" so it would be hard to match more than once on the same line ;-)
I agree that it is the right solution to make the whole thing case-insensitive by adding 'i' at the end.
FWIW, the RFC first says this:
1.2.2. Syntactic notation
This standard uses the Augmented Backus-Naur Form (ABNF) notation specified in [RFC2234] for the formal definitions of the syntax of messages. Characters will be specified either by a decimal value (e.g., the value %d65 for uppercase A and %d97 for lowercase A) or by a case-insensitive literal value enclosed in quotation marks (e.g., "A" for either uppercase or lowercase A).
and then goes on to define how message-id should look like.
3.6.4. Identification fields
Quoted 7 lines
message-id = "Message-ID:" msg-id CRLF
But if you go the "add /i at the end" route, you do not have to upcase "d" to "D" and that may reduce the patch noise (it only matters if the patch viewer highlights letter-by-letter changes for your recipients).
From the RFC nitpicking department, msg-id is allowed to contain CFWS (comments and folding white space) outside the angle brackets, which means you could have RFC compliant Message-ID header field:
Message-ID:
<[email protected]>
or
Message-ID: (comment)
<[email protected]>
or even worse, really.
The moral of the story is that you should always offload the header parsing to some tool or library designed to do that.
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
Quoted 4 lines · Jani Nikula
From the RFC nitpicking department, ...
Message-ID: (comment)
<[email protected]>
Thanks for a fun piece; the (comment) is quite interesting.
I wasn't having fun with RFC nitpicking, though. I was reacting to this part of the message I was responding to ...
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Fwiw, every mail and HTTP/1.x header parser I've looked at works case-insensitively. Also, I'm not sure if `g' is needed, actually...
... to say that "works case-insensitively" may not just be empirically correct, but RFC backs him up, to Eric.
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
In reply to Jani NikulaQuoted 9 lines · Jani Nikula
From the RFC nitpicking department, msg-id is allowed to contain CFWS (comments and folding white space) outside the angle brackets, which means you could have RFC compliant Message-ID header field:
Message-ID:
<[email protected]>or
Quoted 7 lines
Message-ID: (comment)
<[email protected]>or even worse, really.
The moral of the story is that you should always offload the header parsing to some tool or library designed to do that.
It's a bit much for common cases with git-send-email and reasonable MUAs, I think. I don't know if formail is commonly installed, nowadays...
Fwiw, the code running lore uses something like this:
/^Message-ID:[ \t]*([^\n]*\r?\n # 1st line # continuation lines: (?:[^:\n]*?[ \t]+[^\n]*\r?\n)*) /ismx
I'm fine with this non-trivial regexp being included with GPL-2.0 code; but it could be too big for a one-liner *shrug*
... And <([^>]+)>/s to extract Message-IDs, but ISTR the code behind lore doesn't handle spaces inside <> properly, but I'm not sure if there's enough valid, non-spam messages with them...
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
In reply to Junio C HamanoQuoted 1 line · Junio C Hamano
I wasn't having fun with RFC nitpicking, though.
I didn't mean to imply you were, I was saying I was!
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
In reply to Eric WongQuoted 6 lines · Eric Wong
Quoted 2 lines · Jani Nikula
The moral of the story is that you should always offload the header parsing to some tool or library designed to do that.
It's a bit much for common cases with git-send-email and reasonable MUAs, I think.
I think you can have unreasonable MDAs in between, though!
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
In reply to Jani NikulaQuoted 6 lines · On Mon, 29 Nov 2021 14:03:09 +0200 Jani Nikula <[email protected]> wrote:
Quoted 1 line
From the RFC nitpicking department, msg-id is allowed to contain CFWS
(comments and folding white space) outside the angle brackets, which means you could have RFC compliant Message-ID header field:
Message-ID:
<[email protected]>
My scripts have already been hit by this. (I've been lazy and not fixed it, but instead, just edit the file that it is parsing manually, to be on one line :-p)
-- Steve
Jonathan Corbet
maintainerRe: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
In reply to Thorsten LeemhuisQuoted 10 lines · Thorsten Leemhuis
Introduce the tags 'Reported:' and 'Reviewed:' in addition to 'Link:', as the latter is overloaded and hence doesn't indicate what the provided URL is about. Documenting these also provides clarity, as a few developers have used 'References:' to point to problem reports; nevertheless 'Reported:' was chosen for this purpose, as it perfectly matches up with the 'Reported-by:' tag commonly used already and needed in this situation already.
Signed-off-by Thorsten Leemhuis <[email protected]>
Thanks for flooding my inbox during a holiday week :) Just looking at this now.
Quoted 15 lines
v1/RFC:
- first, *rough version* to see how this idea is received in the community--- Documentation/maintainer/configure-git.rst | 6 +-- Documentation/process/5.Posting.rst | 54 ++++++++++++++------ Documentation/process/submitting-patches.rst | 22 ++++---- 3 files changed, 53 insertions(+), 29 deletions(-)Documentation/maintainer/configure-git.rst +0
-0@@ -40,12 +40,12 @@ Creating commit links to lore.kernel.org The web site http://lore.kernel.org is meant as a grand archive of all mail
Documentation/maintainer/configure-git.rst Creating commit links to lore.kernel.org · line 48
Quoted 10 lines
Documentation/maintainer/configure-git.rst +2
-2list traffic concerning or influencing the kernel development. Storing archives of patches here is a recommended practice, and when a maintainer applies a -patch to a subsystem tree, it is a good idea to provide a Link: tag with a +patch to a subsystem tree, it is a good idea to provide a Reviewed: tag with a reference back to the lore archive so that people that browse the commit history can find related discussions and rationale behind a certain change. The link tag will look like this: - Link: https://lore.kernel.org/r/<message-id> + Reviewed: https://lore.kernel.org/r/<message-id>
The *link* tag will look like that?
[...]
Documentation/maintainer/configure-git.rst Creating commit links to lore.kernel.org
Quoted 9 lines
Documentation/maintainer/configure-git.rst +9
-0+The tags in common use are: + + - ``Reported:`` points to a report of a problem fixed by this patch. The + provided URL thus might point to a entry in a bug tracker or a mail in a + mailing list archive. Typically this tag is followed by a "Reported-by:" + tag (see below). + + - ``Link:`` points to websites providing additional backgrounds or details, + for example a document with a specification implemented by the patch.
So this is a serious change from how Link: is used now, and runs counter to the scripts used by a lot of maintainers. I suspect that this thread is only as short as it is because a lot of people haven't seen this yet; it could be a hard change to sell.
Also, I think that documents like specs should be called out separately in the changelog, with text saying what they actually are.
Quoted 2 lines
+ - ``Reviewed:`` ignore this, as maintainers add it when applying a patch, to
+ make the commit point to the latest public review of the patch.
Another question would be: what's the interplay between the (quite similar) "Reviewed" and "Reviewed-by" tags (and the same for the report tags). If there's a "Reviewed" do we still need "Reviewed-by"? That should be spelled out, whichever way is wanted.
I do worry that the similarity is going to lead to a certain amount of confusion and use of the wrong tag. People have a hard time getting all the tags we have now right; adding more that look almost like the existing ones seems like a recipe for trouble.
For these reasons, I would be more inclined toward Konstantin's suggestion of adding notes to the existing Link: tags.
Documentation/maintainer/configure-git.rst
Quoted 9 lines
Documentation/maintainer/configure-git.rst +3
-1+A third kind of tags are used to document which developers were involved in +the development of the patch. Each of these uses this format:: tag: Full Name <email address> optional-other-stuff The tags in common use are: - - Signed-off-by: this is a developer's certification that he or she has + - ``Signed-off-by:`` is a developer's certification that he or she has
So this markup addition is a separate change that would belong in its own patch. Do we really need it, though? It clutters the text and irritates the anti-RST minority (which has been mercifully quiet recently) without really adding any benefit.
Thanks,
jon
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
In reply to Eric WongHi Eric,
Quoted 3 lines · Eric Wong
It's a bit much for common cases with git-send-email and reasonable MUAs, I think. I don't know if formail is commonly installed, nowadays...
Of course ;-) You need it to run checkpatch on patch series obtained through "b4 am", before you apply them to your tree:
$ cat *mbx | formail -s scripts/checkpatch.pl
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
In reply to Jonathan CorbetQuoted 10 lines · Jonathan Corbet
Quoted 8 lines · Thorsten Leemhuis
Introduce the tags 'Reported:' and 'Reviewed:' in addition to 'Link:', as the latter is overloaded and hence doesn't indicate what the provided URL is about. Documenting these also provides clarity, as a few developers have used 'References:' to point to problem reports; nevertheless 'Reported:' was chosen for this purpose, as it perfectly matches up with the 'Reported-by:' tag commonly used already and needed in this situation already.
Quoted 4 lines
Quoted 2 lines
Signed-off-by Thorsten Leemhuis <[email protected]>Thanks for flooding my inbox during a holiday week :)
We didn't have one here. :-D But hey, it wasn't out of envy, I'm a little ignorant to local holiday/festival seasons, too.
Quoted 25 lines
Just looking at this now.
Quoted 23 lines
v1/RFC:
- first, *rough version* to see how this idea is received in the community--- Documentation/maintainer/configure-git.rst | 6 +-- Documentation/process/5.Posting.rst | 54 ++++++++++++++------ Documentation/process/submitting-patches.rst | 22 ++++---- 3 files changed, 53 insertions(+), 29 deletions(-)Documentation/maintainer/configure-git.rst +1
-1@@ -40,12 +40,12 @@ Creating commit links to lore.kernel.org The web site http://lore.kernel.org is meant as a grand archive of all mail list traffic concerning or influencing the kernel development. Storing archives of patches here is a recommended practice, and when a maintainer applies a -patch to a subsystem tree, it is a good idea to provide a Link: tag with a +patch to a subsystem tree, it is a good idea to provide a Reviewed: tag with a reference back to the lore archive so that people that browse the commit history can find related discussions and rationale behind a certain change. The link tag will look like this:
Quoted 4 lines
Documentation/maintainer/configure-git.rst Creating commit links to lore.kernel.org · line 48
Quoted 2 lines
Documentation/maintainer/configure-git.rst +1
-1- Link: https://lore.kernel.org/r/<message-id> + Reviewed: https://lore.kernel.org/r/<message-id>The *link* tag will look like that?
Ha, good point, will fix that.
Quoted 15 lines
[...]
Documentation/maintainer/configure-git.rst
Quoted 9 lines
Documentation/maintainer/configure-git.rst +9
-0+The tags in common use are: + + - ``Reported:`` points to a report of a problem fixed by this patch. The + provided URL thus might point to a entry in a bug tracker or a mail in a + mailing list archive. Typically this tag is followed by a "Reported-by:" + tag (see below). + + - ``Link:`` points to websites providing additional backgrounds or details, + for example a document with a specification implemented by the patch.So this is a serious change from how Link: is used now, and runs counter to the scripts used by a lot of maintainers. I suspect that this thread is only as short as it is because a lot of people haven't seen this yet; it could be a hard change to sell.
Yeah, I'm aware of that. And to be honest: I don't have a strong interest in this, just think it might be the right thing to do. And I just got the impression that regzbot's dependence on the Link: tag for linking to regression reports is making the ambiguity of the tag worse. That lead to the thought: well, simply bring it up now and see what people think; if they don't like it, I can tell myself "well, I tried to improve it, but it was not welcomed" and sleep well at night. At least as long as my cat allows me to. :-)
Quoted 2 lines
Also, I think that documents like specs should be called out separately in the changelog, with text saying what they actually are.
I wonder a little if that is worth the trouble, but hey, why not, fine with me.
Quoted 6 lines
Quoted 2 lines
+ - ``Reviewed:`` ignore this, as maintainers add it when applying a patch, to
+ make the commit point to the latest public review of the patch.Another question would be: what's the interplay between the (quite similar) "Reviewed" and "Reviewed-by" tags (and the same for the report tags).
Hmmm, I liked the interplay for Reported/Reported-by, but yeah, for Reviewed/Reviewed-by I see the problem now.
Quoted 2 lines
If there's a "Reviewed" do we still need "Reviewed-by"? That
should be spelled out, whichever way is wanted.
I didn't want to undermine or obsolete "Reviewed-by" at all. I sometimes wonder if this and "Tested-by" should be stored somewhere else (in "git notes" or something), so they can be extended after a change got committed -- but that's a whole different topic and something I'm even less interested in driving forward. :-D
Maybe "Reviewed" was simply the wrong term. Maybe "Review:", "Posted:", or "MergeRequest:" would be better in general and avoid this problem.
Quoted 7 lines
I do worry that the similarity is going to lead to a certain amount of confusion and use of the wrong tag. People have a hard time getting all the tags we have now right; adding more that look almost like the existing ones seems like a recipe for trouble.
For these reasons, I would be more inclined toward Konstantin's suggestion of adding notes to the existing Link: tags.
Yeah, maybe, but that results in long lines and forces people to type more.
Quoted 5 lines
Quoted 5 lines
Documentation/maintainer/configure-git.rst +2
-0+A third kind of tags are used to document which developers were involved in +the development of the patch. Each of these uses this format:: tag: Full Name <email address> optional-other-stuff
Quoted 7 lines
Quoted 4 lines
The tags in common use are:
- - Signed-off-by: this is a developer's certification that he or she has
+ - ``Signed-off-by:`` is a developer's certification that he or she hasSo this markup addition is a separate change that would belong in its own patch.
Okay.
Quoted 3 lines
Do we really need it, though? It clutters the text and
irritates the anti-RST minority (which has been mercifully quiet recently) without really adding any benefit.
I'm not strongly attached to it. I added it after I noticed that it's at least for me slightly unclear if the colon is part of the tag or used to precede the explanation for the tag (in the 'Signed-off-by' case it's both at the same time). And after adding the proposed tags the html view imho looked a lot better.
Thx for the feedback!
Ciao, Thorsten
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
Hi Thorsten,
Quoted 13 lines · Thorsten Leemhuis
Quoted 12 lines · Jonathan Corbet
Quoted 9 lines · Thorsten Leemhuis
Introduce the tags 'Reported:' and 'Reviewed:' in addition to 'Link:', as the latter is overloaded and hence doesn't indicate what the provided URL is about. Documenting these also provides clarity, as a few developers have used 'References:' to point to problem reports; nevertheless 'Reported:' was chosen for this purpose, as it perfectly matches up with the 'Reported-by:' tag commonly used already and needed in this situation already.
Signed-off-by Thorsten Leemhuis <[email protected]>[...]
Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
Documentation/process/5.Posting.rst +6
-0+The tags in common use are: + + - ``Reported:`` points to a report of a problem fixed by this patch. The + provided URL thus might point to a entry in a bug tracker or a mail in a + mailing list archive. Typically this tag is followed by a "Reported-by:" + tag (see below).Quoted 8 lines
Documentation/process/5.Posting.rst the build process, for example, or editor backup files) in the patch. The · line 223
Quoted 3 lines
Documentation/process/5.Posting.rst +3
-0+ + - ``Link:`` points to websites providing additional backgrounds or details, + for example a document with a specification implemented by the patch.So this is a serious change from how Link: is used now, and runs counter to the scripts used by a lot of maintainers. I suspect that this thread is only as short as it is because a lot of people haven't seen this yet; it could be a hard change to sell.
I saw it, but decided to wait a bit for other input...
Quoted 28 lines
Yeah, I'm aware of that. And to be honest: I don't have a strong interest in this, just think it might be the right thing to do. And I just got the impression that regzbot's dependence on the Link: tag for linking to regression reports is making the ambiguity of the tag worse. That lead to the thought: well, simply bring it up now and see what people think; if they don't like it, I can tell myself "well, I tried to improve it, but it was not welcomed" and sleep well at night. At least as long as my cat allows me to. :-)
Quoted 2 lines
Also, I think that documents like specs should be called out separately in the changelog, with text saying what they actually are.
I wonder a little if that is worth the trouble, but hey, why not, fine with me.
Quoted 6 lines
Quoted 2 lines
+ - ``Reviewed:`` ignore this, as maintainers add it when applying a patch, to
+ make the commit point to the latest public review of the patch.Another question would be: what's the interplay between the (quite similar) "Reviewed" and "Reviewed-by" tags (and the same for the report tags).
Hmmm, I liked the interplay for Reported/Reported-by, but yeah, for Reviewed/Reviewed-by I see the problem now.
Quoted 2 lines
If there's a "Reviewed" do we still need "Reviewed-by"? That
should be spelled out, whichever way is wanted.
Quoted 16 lines
I didn't want to undermine or obsolete "Reviewed-by" at all. I sometimes wonder if this and "Tested-by" should be stored somewhere else (in "git notes" or something), so they can be extended after a change got committed -- but that's a whole different topic and something I'm even less interested in driving forward. :-D
Maybe "Reviewed" was simply the wrong term. Maybe "Review:", "Posted:", or "MergeRequest:" would be better in general and avoid this problem.
Quoted 7 lines
I do worry that the similarity is going to lead to a certain amount of confusion and use of the wrong tag. People have a hard time getting all the tags we have now right; adding more that look almost like the existing ones seems like a recipe for trouble.
For these reasons, I would be more inclined toward Konstantin's suggestion of adding notes to the existing Link: tags.
Exactly. The power of the "Link" tag is that it can refer to a variety of related content. I.e. the meaning is derived from the link target, which can be an email discussion, a bug report, a bug tracker page, ...
A proliferation of tags complicates life for patch authors and commit analyzers. IMHO adding tags should only be done as a last resort, as it doesn't come without a cost.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
In reply to Geert UytterhoevenHi Eric!
Quoted 4 lines · Geert Uytterhoeven
Quoted 3 lines · Eric Wong
It's a bit much for common cases with git-send-email and reasonable MUAs, I think. I don't know if formail is commonly installed, nowadays...
Well, after your earlier suggestion I considered to go with this:
- perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Link:
https://lore.kernel.org/r/$1|g;' "$1"
+ perl -pi -e 's|^Message-ID:\s*<?([^>]+)>?$|Link:
https://lore.kernel.org/r/$1|i;' "$1"
But...
Quoted 4 lines
Of course ;-) You need it to run checkpatch on patch series obtained through "b4 am", before you apply them to your tree:
$ cat *mbx | formail -s scripts/checkpatch.pl
...this made me wonder if formail would be the better solution. I came up with this:
formail -A "Link: https://lore.kernel.org/r/formail -c -x Message-ID < "${1}" | sed 's!.*<\(.*\)>!\1!'" < "${1}" | sponge "${1}"
Downsides: instead of perl it requires sed and sponge (part of moreutils, which I guess not everyone has installed; but I tried to avoid a big here document or moving files around).
Is that worth it? Or is there a way to realize this in a more elegant fashion with tools everyone has installed?
Ciao, Thorsten
Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'
Quoted 23 lines · Thorsten Leemhuis
Quoted 4 lines · Geert Uytterhoeven
Quoted 3 lines · Eric Wong
It's a bit much for common cases with git-send-email and reasonable MUAs, I think. I don't know if formail is commonly installed, nowadays...
Well, after your earlier suggestion I considered to go with this:
(quoted diff) +0
-1- perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Link:https://lore.kernel.org/r/$1|g;' "$1"
(quoted diff) +1
-0+ perl -pi -e 's|^Message-ID:\s*<?([^>]+)>?$|Link:https://lore.kernel.org/r/$1|i;' "$1"
But...
Quoted 4 lines
Of course ;-) You need it to run checkpatch on patch series obtained through "b4 am", before you apply them to your tree:
$ cat *mbx | formail -s scripts/checkpatch.pl...this made me wonder if formail would be the better solution. I came up with this:
Quoted 6 lines
formail -A "Link: https://lore.kernel.org/r/
formail -c -x Message-ID < "${1}" | sed 's!.*<\(.*\)>!\1!'" < "${1}" | sponge "${1}"Downsides: instead of perl it requires sed and sponge (part of moreutils, which I guess not everyone has installed; but I tried to avoid a big here document or moving files around).
As Geert noted, formail is probably reasonable, but I certainly don't have moreutils across all the systems I'm using right now.
Quoted 2 lines
Is that worth it? Or is there a way to realize this in a more elegant fashion with tools everyone has installed?
*shrug* Since newlines after ':' are a concern and it's (probably :P) safe to slurp entire contents of emails into memory nowadays; some minor tweaks to the original perl invocation should work:
* use `$/ = undef' to force Perl to operate on the entire input at once
* use m' RE modifier to ensure ^' and $' still match SOL/EOL ($/ is only the input record separator, it doesn't change Perl's definition of "lines" for ^' and `$')
perl -i -p -e 'BEGIN{$/=undef};s|^Message-ID:\s*<?([^>]+)>?$|Link:
https://lore.kernel.org/r/$1|im;'