{"thread":{"id":"56968","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","startedAt":"2021-11-23T18:52:39Z","lastAt":"2021-12-08T17:02:31Z","messageCount":19,"participants":["Eric Wong","Junio C Hamano","Ævar Arnfjörð Bjarmason","Thorsten Leemhuis","Jani Nikula","Steven Rostedt","Geert Uytterhoeven"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"442188","messageId":"20211123185237.M476855@dcvr","threadId":"56968","inReplyTo":"6b760115ecdd3687d4b82680b284f55a04f3ad90.1637566224.git.linux@leemhuis.info","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Eric Wong","fromEmail":"e@80x24.org","sentAt":"2021-11-23T18:52:37Z","receivedAt":"2021-11-23T18:52:39Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Thorsten Leemhuis <linux@leemhuis.info> wrote:\n> diff --git a/Documentation/maintainer/configure-git.rst b/Documentation/maintainer/configure-git.rst\n> index 80ae5030a590..8429d45d661c 100644\n> --- a/Documentation/maintainer/configure-git.rst\n> +++ b/Documentation/maintainer/configure-git.rst\n\n<snip>, +cc git@vger\n\n> @@ -56,7 +56,7 @@ by adding the following hook into your git:\n>  \t$ cat >.git/hooks/applypatch-msg <<'EOF'\n>  \t#!/bin/sh\n>  \t. git-sh-setup\n> -\tperl -pi -e 's|^Message-Id:\\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' \"$1\"\n> +\tperl -pi -e 's|^Message-Id:\\s*<?([^>]+)>?$|Reviewed: https://lore.kernel.org/r/$1|g;' \"$1\"\n\nSide note: that regexp should match \"Message-ID\" case-insensitively.\ngit send-email is an outlier in its capitalization of \"Message-Id\",\nmost RFCs capitalize it \"Message-ID\", as do common MUAs.\n\ngit send-email's capitalization does annoy me and I've looked\ninto changing it; but there's a bunch of tests and probably\ndependent code that also need to be updated...\n"},{"id":"442222","messageId":"xmqq4k825o6r.fsf@gitster.g","threadId":"56968","inReplyTo":"20211123185237.M476855@dcvr","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-11-24T01:37:16Z","receivedAt":"2021-11-24T01:37:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <e@80x24.org> writes:\n\n> git send-email's capitalization does annoy me and I've looked\n> into changing it; but there's a bunch of tests and probably\n> dependent code that also need to be updated...\n\nIt does annoy me, too, and I do not mind if it gets \"fixed\", but I\ndo not know if the cost for vetting a bulk update like that is worth\nit.  There is another one outside send-email in log-tree.c that is\nresponsible for output from format-patch.\n\nHere is the extent of damage in my trial change that seems to pass\nthe tests locally.\n\n Documentation/MyFirstContribution.txt | 14 ++++-----\n Documentation/git-format-patch.txt    |  4 +--\n Documentation/git-send-email.txt      |  2 +-\n git-send-email.perl                   |  4 +--\n log-tree.c                            |  2 +-\n mailinfo.c                            |  4 +--\n t/t4014-format-patch.sh               | 56 +++++++++++++++++------------------\n t/t4150-am.sh                         |  8 ++---\n t/t4258/mbox                          |  2 +-\n t/t5100/msg0002                       |  2 +-\n t/t5100/msg0003                       |  2 +-\n t/t5100/msg0012--message-id           |  2 +-\n t/t5100/quoted-cr.mbox                |  4 +--\n t/t5100/sample.mbox                   |  6 ++--\n t/t9001-send-email.sh                 | 38 ++++++++++++------------\n 15 files changed, 75 insertions(+), 75 deletions(-)\n\ndiff --git i/Documentation/MyFirstContribution.txt w/Documentation/MyFirstContribution.txt\nindex b20bc8e914..91cb204d52 100644\n--- i/Documentation/MyFirstContribution.txt\n+++ w/Documentation/MyFirstContribution.txt\n@@ -1071,21 +1071,21 @@ between your last version and now, if it's something significant. You do not\n need the exact same body in your second cover letter; focus on explaining to\n reviewers the changes you've made that may not be as visible.\n \n-You will also need to go and find the Message-Id of your previous cover letter.\n+You will also need to go and find the Message-ID of your previous cover letter.\n You can either note it when you send the first series, from the output of `git\n send-email`, or you can look it up on the\n https://lore.kernel.org/git[mailing list]. Find your cover letter in the\n-archives, click on it, then click \"permalink\" or \"raw\" to reveal the Message-Id\n+archives, click on it, then click \"permalink\" or \"raw\" to reveal the Message-ID\n header. It should match:\n \n ----\n-Message-Id: <foo.12345.author@example.com>\n+Message-ID: <foo.12345.author@example.com>\n ----\n \n-Your Message-Id is `<foo.12345.author@example.com>`. This example will be used\n-below as well; make sure to replace it with the correct Message-Id for your\n-**previous cover letter** - that is, if you're sending v2, use the Message-Id\n-from v1; if you're sending v3, use the Message-Id from v2.\n+Your Message-ID is `<foo.12345.author@example.com>`. This example will be used\n+below as well; make sure to replace it with the correct Message-ID for your\n+**previous cover letter** - that is, if you're sending v2, use the Message-ID\n+from v1; if you're sending v3, use the Message-ID from v2.\n \n While you're looking at the email, you should also note who is CC'd, as it's\n common practice in the mailing list to keep all CCs on a thread. You can add\ndiff --git i/Documentation/git-format-patch.txt w/Documentation/git-format-patch.txt\nindex 113eabc107..daf911f249 100644\n--- i/Documentation/git-format-patch.txt\n+++ w/Documentation/git-format-patch.txt\n@@ -99,7 +99,7 @@ To omit patch numbers from the subject, use `-N`.\n \n If given `--thread`, `git-format-patch` will generate `In-Reply-To` and\n `References` headers to make the second and subsequent patch mails appear\n-as replies to the first mail; this also generates a `Message-Id` header to\n+as replies to the first mail; this also generates a `Message-ID` header to\n reference.\n \n OPTIONS\n@@ -163,7 +163,7 @@ include::diff-options.txt[]\n --no-thread::\n \tControls addition of `In-Reply-To` and `References` headers to\n \tmake the second and subsequent mails appear as replies to the\n-\tfirst.  Also controls generation of the `Message-Id` header to\n+\tfirst.  Also controls generation of the `Message-ID` header to\n \treference.\n +\n The optional <style> argument can be either `shallow` or `deep`.\ndiff --git i/Documentation/git-send-email.txt w/Documentation/git-send-email.txt\nindex 3db4eab4ba..086f132229 100644\n--- i/Documentation/git-send-email.txt\n+++ w/Documentation/git-send-email.txt\n@@ -91,7 +91,7 @@ See the CONFIGURATION section for `sendemail.multiEdit`.\n \n --in-reply-to=<identifier>::\n \tMake the first mail (or all the mails with `--no-thread`) appear as a\n-\treply to the given Message-Id, which avoids breaking threads to\n+\treply to the given Message-ID, which avoids breaking threads to\n \tprovide a new patch series.\n \tThe second and subsequent emails will be sent as replies according to\n \tthe `--[no-]chain-reply-to` setting.\ndiff --git i/git-send-email.perl w/git-send-email.perl\nindex 5262d88ee3..a61134c7d3 100755\n--- i/git-send-email.perl\n+++ w/git-send-email.perl\n@@ -1494,7 +1494,7 @@ sub send_message {\n To: $to${ccline}\n Subject: $subject\n Date: $date\n-Message-Id: $message_id\n+Message-ID: $message_id\n \";\n \tif ($use_xmailer) {\n \t\t$header .= \"X-Mailer: git-send-email $gitversion\\n\";\n@@ -1789,7 +1789,7 @@ sub process_file {\n \t\t\t\t$has_mime_version = 1;\n \t\t\t\tpush @xh, $_;\n \t\t\t}\n-\t\t\telsif (/^Message-Id: (.*)/i) {\n+\t\t\telsif (/^Message-ID: (.*)/i) {\n \t\t\t\t$message_id = $1;\n \t\t\t}\n \t\t\telsif (/^Content-Transfer-Encoding: (.*)/i) {\ndiff --git i/log-tree.c w/log-tree.c\nindex 644893fd8c..818cea5f12 100644\n--- i/log-tree.c\n+++ w/log-tree.c\n@@ -428,7 +428,7 @@ void log_write_email_headers(struct rev_info *opt, struct commit *commit,\n \tfprintf(opt->diffopt.file, \"From %s Mon Sep 17 00:00:00 2001\\n\", name);\n \tgraph_show_oneline(opt->graph);\n \tif (opt->message_id) {\n-\t\tfprintf(opt->diffopt.file, \"Message-Id: <%s>\\n\", opt->message_id);\n+\t\tfprintf(opt->diffopt.file, \"Message-ID: <%s>\\n\", opt->message_id);\n \t\tgraph_show_oneline(opt->graph);\n \t}\n \tif (opt->ref_message_ids && opt->ref_message_ids->nr > 0) {\ndiff --git i/mailinfo.c w/mailinfo.c\nindex 02f6f95357..855349cc0e 100644\n--- i/mailinfo.c\n+++ w/mailinfo.c\n@@ -597,7 +597,7 @@ static int check_header(struct mailinfo *mi,\n \t\tret = 1;\n \t\tgoto check_header_out;\n \t}\n-\tif (parse_header(line, \"Message-Id\", mi, &sb)) {\n+\tif (parse_header(line, \"Message-ID\", mi, &sb)) {\n \t\tif (mi->add_message_id)\n \t\t\tmi->message_id = strbuf_detach(&sb, NULL);\n \t\tret = 1;\n@@ -829,7 +829,7 @@ static int handle_commit_msg(struct mailinfo *mi, struct strbuf *line)\n \tif (patchbreak(line)) {\n \t\tif (mi->message_id)\n \t\t\tstrbuf_addf(&mi->log_message,\n-\t\t\t\t    \"Message-Id: %s\\n\", mi->message_id);\n+\t\t\t\t    \"Message-ID: %s\\n\", mi->message_id);\n \t\treturn 1;\n \t}\n \ndiff --git i/t/t4014-format-patch.sh w/t/t4014-format-patch.sh\nindex 712d4b5ddf..973899d165 100755\n--- i/t/t4014-format-patch.sh\n+++ w/t/t4014-format-patch.sh\n@@ -445,13 +445,13 @@ test_expect_success 'no threading' '\n \n cat >expect.thread <<EOF\n ---\n-Message-Id: <0>\n+Message-ID: <0>\n ---\n-Message-Id: <1>\n+Message-ID: <1>\n In-Reply-To: <0>\n References: <0>\n ---\n-Message-Id: <2>\n+Message-ID: <2>\n In-Reply-To: <0>\n References: <0>\n EOF\n@@ -462,15 +462,15 @@ test_expect_success 'thread' '\n \n cat >expect.in-reply-to <<EOF\n ---\n-Message-Id: <0>\n+Message-ID: <0>\n In-Reply-To: <1>\n References: <1>\n ---\n-Message-Id: <2>\n+Message-ID: <2>\n In-Reply-To: <1>\n References: <1>\n ---\n-Message-Id: <3>\n+Message-ID: <3>\n In-Reply-To: <1>\n References: <1>\n EOF\n@@ -482,17 +482,17 @@ test_expect_success 'thread in-reply-to' '\n \n cat >expect.cover-letter <<EOF\n ---\n-Message-Id: <0>\n+Message-ID: <0>\n ---\n-Message-Id: <1>\n+Message-ID: <1>\n In-Reply-To: <0>\n References: <0>\n ---\n-Message-Id: <2>\n+Message-ID: <2>\n In-Reply-To: <0>\n References: <0>\n ---\n-Message-Id: <3>\n+Message-ID: <3>\n In-Reply-To: <0>\n References: <0>\n EOF\n@@ -503,21 +503,21 @@ test_expect_success 'thread cover-letter' '\n \n cat >expect.cl-irt <<EOF\n ---\n-Message-Id: <0>\n+Message-ID: <0>\n In-Reply-To: <1>\n References: <1>\n ---\n-Message-Id: <2>\n+Message-ID: <2>\n In-Reply-To: <0>\n References: <1>\n \t<0>\n ---\n-Message-Id: <3>\n+Message-ID: <3>\n In-Reply-To: <0>\n References: <1>\n \t<0>\n ---\n-Message-Id: <4>\n+Message-ID: <4>\n In-Reply-To: <0>\n References: <1>\n \t<0>\n@@ -535,13 +535,13 @@ test_expect_success 'thread explicit shallow' '\n \n cat >expect.deep <<EOF\n ---\n-Message-Id: <0>\n+Message-ID: <0>\n ---\n-Message-Id: <1>\n+Message-ID: <1>\n In-Reply-To: <0>\n References: <0>\n ---\n-Message-Id: <2>\n+Message-ID: <2>\n In-Reply-To: <1>\n References: <0>\n \t<1>\n@@ -553,16 +553,16 @@ test_expect_success 'thread deep' '\n \n cat >expect.deep-irt <<EOF\n ---\n-Message-Id: <0>\n+Message-ID: <0>\n In-Reply-To: <1>\n References: <1>\n ---\n-Message-Id: <2>\n+Message-ID: <2>\n In-Reply-To: <0>\n References: <1>\n \t<0>\n ---\n-Message-Id: <3>\n+Message-ID: <3>\n In-Reply-To: <2>\n References: <1>\n \t<0>\n@@ -576,18 +576,18 @@ test_expect_success 'thread deep in-reply-to' '\n \n cat >expect.deep-cl <<EOF\n ---\n-Message-Id: <0>\n+Message-ID: <0>\n ---\n-Message-Id: <1>\n+Message-ID: <1>\n In-Reply-To: <0>\n References: <0>\n ---\n-Message-Id: <2>\n+Message-ID: <2>\n In-Reply-To: <1>\n References: <0>\n \t<1>\n ---\n-Message-Id: <3>\n+Message-ID: <3>\n In-Reply-To: <2>\n References: <0>\n \t<1>\n@@ -600,22 +600,22 @@ test_expect_success 'thread deep cover-letter' '\n \n cat >expect.deep-cl-irt <<EOF\n ---\n-Message-Id: <0>\n+Message-ID: <0>\n In-Reply-To: <1>\n References: <1>\n ---\n-Message-Id: <2>\n+Message-ID: <2>\n In-Reply-To: <0>\n References: <1>\n \t<0>\n ---\n-Message-Id: <3>\n+Message-ID: <3>\n In-Reply-To: <2>\n References: <1>\n \t<0>\n \t<2>\n ---\n-Message-Id: <4>\n+Message-ID: <4>\n In-Reply-To: <3>\n References: <1>\n \t<0>\ndiff --git i/t/t4150-am.sh w/t/t4150-am.sh\nindex 2aaaa0d7de..f41418c6e9 100755\n--- i/t/t4150-am.sh\n+++ w/t/t4150-am.sh\n@@ -103,7 +103,7 @@ test_expect_success setup '\n \n \tgit format-patch --stdout first >patch1 &&\n \t{\n-\t\techo \"Message-Id: <1226501681-24923-1-git-send-email-bda@mnsspb.ru>\" &&\n+\t\techo \"Message-ID: <1226501681-24923-1-git-send-email-bda@mnsspb.ru>\" &&\n \t\techo \"X-Fake-Field: Line One\" &&\n \t\techo \"X-Fake-Field: Line Two\" &&\n \t\techo \"X-Fake-Field: Line Three\" &&\n@@ -916,7 +916,7 @@ test_expect_success 'am --message-id really adds the message id' '\n \tgit am --message-id patch1.eml &&\n \ttest_path_is_missing .git/rebase-apply &&\n \tgit cat-file commit HEAD | tail -n1 >actual &&\n-\tgrep Message-Id patch1.eml >expected &&\n+\tgrep Message-ID patch1.eml >expected &&\n \ttest_cmp expected actual\n '\n \n@@ -928,7 +928,7 @@ test_expect_success 'am.messageid really adds the message id' '\n \tgit am patch1.eml &&\n \ttest_path_is_missing .git/rebase-apply &&\n \tgit cat-file commit HEAD | tail -n1 >actual &&\n-\tgrep Message-Id patch1.eml >expected &&\n+\tgrep Message-ID patch1.eml >expected &&\n \ttest_cmp expected actual\n '\n \n@@ -939,7 +939,7 @@ test_expect_success 'am --message-id -s signs off after the message id' '\n \tgit am -s --message-id patch1.eml &&\n \ttest_path_is_missing .git/rebase-apply &&\n \tgit cat-file commit HEAD | tail -n2 | head -n1 >actual &&\n-\tgrep Message-Id patch1.eml >expected &&\n+\tgrep Message-ID patch1.eml >expected &&\n \ttest_cmp expected actual\n '\n \ndiff --git i/t/t4258/mbox w/t/t4258/mbox\nindex c62819f3d2..1ae528ba78 100644\n--- i/t/t4258/mbox\n+++ w/t/t4258/mbox\n@@ -2,7 +2,7 @@ From: A U Thor <mail@example.com>\n To: list@example.org\n Subject: [PATCH v2] sample\n Date: Mon,  3 Aug 2020 22:40:55 +0700\n-Message-Id: <msg-id@example.com>\n+Message-ID: <msg-id@example.com>\n Content-Type: text/plain; charset=\"utf-8\"\n Content-Transfer-Encoding: base64\n \ndiff --git i/t/t5100/msg0002 w/t/t5100/msg0002\nindex e2546ec733..1089382425 100644\n--- i/t/t5100/msg0002\n+++ w/t/t5100/msg0002\n@@ -3,7 +3,7 @@ message:\n \n From: Nit Picker <nit.picker@example.net>\n Subject: foo is too old\n-Message-Id: <nitpicker.12121212@example.net>\n+Message-ID: <nitpicker.12121212@example.net>\n \n Hopefully this would fix the problem stated there.\n \ndiff --git i/t/t5100/msg0003 w/t/t5100/msg0003\nindex 1ac68101b1..3402b534a6 100644\n--- i/t/t5100/msg0003\n+++ w/t/t5100/msg0003\n@@ -3,7 +3,7 @@ message:\n \n From: Nit Picker <nit.picker@example.net>\n Subject: foo is too old\n-Message-Id: <nitpicker.12121212@example.net>\n+Message-ID: <nitpicker.12121212@example.net>\n \n Hopefully this would fix the problem stated there.\n \ndiff --git i/t/t5100/msg0012--message-id w/t/t5100/msg0012--message-id\nindex 376e26e9ae..44482958ce 100644\n--- i/t/t5100/msg0012--message-id\n+++ w/t/t5100/msg0012--message-id\n@@ -5,4 +5,4 @@ docutils заменён на python-docutils\n python-docutils. В то время как сам rest2web не нужен.\n \n Signed-off-by: Dmitriy Blinov <bda@mnsspb.ru>\n-Message-Id: <1226501681-24923-1-git-send-email-bda@mnsspb.ru>\n+Message-ID: <1226501681-24923-1-git-send-email-bda@mnsspb.ru>\ndiff --git i/t/t5100/quoted-cr.mbox w/t/t5100/quoted-cr.mbox\nindex 909021bb7a..a529d4de08 100644\n--- i/t/t5100/quoted-cr.mbox\n+++ w/t/t5100/quoted-cr.mbox\n@@ -3,7 +3,7 @@ From: A U Thor <mail@example.com>\n To: list@example.org\n Subject: [PATCH v2] sample\n Date: Mon,  3 Aug 2020 22:40:55 +0700\n-Message-Id: <msg-id@example.com>\n+Message-ID: <msg-id@example.com>\n Content-Type: text/plain; charset=\"utf-8\"\n Content-Transfer-Encoding: base64\n \n@@ -27,7 +27,7 @@ From: A U Thor <mail@example.com>\n To: list@example.org\n Subject: [PATCH v2] sample\n Date: Mon,  3 Aug 2020 22:40:55 +0700\n-Message-Id: <msg-id2@example.com>\n+Message-ID: <msg-id2@example.com>\n Content-Type: text/plain; charset=\"utf-8\"\n Content-Transfer-Encoding: base64\n \ndiff --git i/t/t5100/sample.mbox w/t/t5100/sample.mbox\nindex 6d4d0e4474..4a54ee5171 100644\n--- i/t/t5100/sample.mbox\n+++ w/t/t5100/sample.mbox\n@@ -35,7 +35,7 @@ message:\n \n From: Nit Picker <nit.picker@example.net>\n Subject: foo is too old\n-Message-Id: <nitpicker.12121212@example.net>\n+Message-ID: <nitpicker.12121212@example.net>\n \n Hopefully this would fix the problem stated there.\n \n@@ -78,7 +78,7 @@ message:\n \n From: Nit Picker <nit.picker@example.net>\n Subject: foo is too old\n-Message-Id: <nitpicker.12121212@example.net>\n+Message-ID: <nitpicker.12121212@example.net>\n \n Hopefully this would fix the problem stated there.\n \n@@ -508,7 +508,7 @@ From bda@mnsspb.ru Wed Nov 12 17:54:41 2008\n From: Dmitriy Blinov <bda@mnsspb.ru>\n To: navy-patches@dinar.mns.mnsspb.ru\n Date: Wed, 12 Nov 2008 17:54:41 +0300\n-Message-Id: <1226501681-24923-1-git-send-email-bda@mnsspb.ru>\n+Message-ID: <1226501681-24923-1-git-send-email-bda@mnsspb.ru>\n X-Mailer: git-send-email 1.5.6.5\n MIME-Version: 1.0\n Content-Type: text/plain;\ndiff --git i/t/t9001-send-email.sh w/t/t9001-send-email.sh\nindex aa0c20499b..ce09cf1fe3 100755\n--- i/t/t9001-send-email.sh\n+++ w/t/t9001-send-email.sh\n@@ -11,7 +11,7 @@ PREREQ=\"PERL\"\n \n replace_variable_fields () {\n \tsed\t-e \"s/^\\(Date:\\).*/\\1 DATE-STRING/\" \\\n-\t\t-e \"s/^\\(Message-Id:\\).*/\\1 MESSAGE-ID-STRING/\" \\\n+\t\t-e \"s/^\\(Message-ID:\\).*/\\1 MESSAGE-ID-STRING/\" \\\n \t\t-e \"s/^\\(X-Mailer:\\).*/\\1 X-MAILER-STRING/\"\n }\n \n@@ -224,7 +224,7 @@ Cc: cc@example.com,\n \ttwo@example.com\n Subject: [PATCH 1/1] Second.\n Date: DATE-STRING\n-Message-Id: MESSAGE-ID-STRING\n+Message-ID: MESSAGE-ID-STRING\n X-Mailer: X-MAILER-STRING\n In-Reply-To: <unique-message-id@example.com>\n References: <unique-message-id@example.com>\n@@ -616,7 +616,7 @@ test_expect_success $PREREQ 'In-Reply-To without --chain-reply-to' '\n \tsed -n -e \"s/^In-Reply-To: *\\(.*\\)/\\1/p\" msgtxt1 >actual &&\n \ttest_cmp expect actual &&\n \t# Second and subsequent messages are replies to the first one\n-\tsed -n -e \"s/^Message-Id: *\\(.*\\)/\\1/p\" msgtxt1 >expect &&\n+\tsed -n -e \"s/^Message-ID: *\\(.*\\)/\\1/p\" msgtxt1 >expect &&\n \tsed -n -e \"s/^In-Reply-To: *\\(.*\\)/\\1/p\" msgtxt2 >actual &&\n \ttest_cmp expect actual &&\n \tsed -n -e \"s/^In-Reply-To: *\\(.*\\)/\\1/p\" msgtxt3 >actual &&\n@@ -636,10 +636,10 @@ test_expect_success $PREREQ 'In-Reply-To with --chain-reply-to' '\n \t\t2>errors &&\n \tsed -n -e \"s/^In-Reply-To: *\\(.*\\)/\\1/p\" msgtxt1 >actual &&\n \ttest_cmp expect actual &&\n-\tsed -n -e \"s/^Message-Id: *\\(.*\\)/\\1/p\" msgtxt1 >expect &&\n+\tsed -n -e \"s/^Message-ID: *\\(.*\\)/\\1/p\" msgtxt1 >expect &&\n \tsed -n -e \"s/^In-Reply-To: *\\(.*\\)/\\1/p\" msgtxt2 >actual &&\n \ttest_cmp expect actual &&\n-\tsed -n -e \"s/^Message-Id: *\\(.*\\)/\\1/p\" msgtxt2 >expect &&\n+\tsed -n -e \"s/^Message-ID: *\\(.*\\)/\\1/p\" msgtxt2 >expect &&\n \tsed -n -e \"s/^In-Reply-To: *\\(.*\\)/\\1/p\" msgtxt3 >actual &&\n \ttest_cmp expect actual\n '\n@@ -712,7 +712,7 @@ Cc: cc@example.com,\n \ttwo@example.com\n Subject: [PATCH 1/1] Second.\n Date: DATE-STRING\n-Message-Id: MESSAGE-ID-STRING\n+Message-ID: MESSAGE-ID-STRING\n X-Mailer: X-MAILER-STRING\n MIME-Version: 1.0\n Content-Transfer-Encoding: 8bit\n@@ -758,7 +758,7 @@ Cc: A <author@example.com>,\n \ttwo@example.com\n Subject: [PATCH 1/1] Second.\n Date: DATE-STRING\n-Message-Id: MESSAGE-ID-STRING\n+Message-ID: MESSAGE-ID-STRING\n X-Mailer: X-MAILER-STRING\n MIME-Version: 1.0\n Content-Transfer-Encoding: 8bit\n@@ -795,7 +795,7 @@ Cc: A <author@example.com>,\n \tC O Mitter <committer@example.com>\n Subject: [PATCH 1/1] Second.\n Date: DATE-STRING\n-Message-Id: MESSAGE-ID-STRING\n+Message-ID: MESSAGE-ID-STRING\n X-Mailer: X-MAILER-STRING\n MIME-Version: 1.0\n Content-Transfer-Encoding: 8bit\n@@ -823,7 +823,7 @@ From: Example <from@example.com>\n To: to@example.com\n Subject: [PATCH 1/1] Second.\n Date: DATE-STRING\n-Message-Id: MESSAGE-ID-STRING\n+Message-ID: MESSAGE-ID-STRING\n X-Mailer: X-MAILER-STRING\n MIME-Version: 1.0\n Content-Transfer-Encoding: 8bit\n@@ -859,7 +859,7 @@ Cc: A <author@example.com>,\n \tcc-cmd@example.com\n Subject: [PATCH 1/1] Second.\n Date: DATE-STRING\n-Message-Id: MESSAGE-ID-STRING\n+Message-ID: MESSAGE-ID-STRING\n X-Mailer: X-MAILER-STRING\n MIME-Version: 1.0\n Content-Transfer-Encoding: 8bit\n@@ -892,7 +892,7 @@ Cc: A <author@example.com>,\n \ttwo@example.com\n Subject: [PATCH 1/1] Second.\n Date: DATE-STRING\n-Message-Id: MESSAGE-ID-STRING\n+Message-ID: MESSAGE-ID-STRING\n X-Mailer: X-MAILER-STRING\n MIME-Version: 1.0\n Content-Transfer-Encoding: 8bit\n@@ -925,7 +925,7 @@ Cc: A <author@example.com>,\n \ttwo@example.com\n Subject: [PATCH 1/1] Second.\n Date: DATE-STRING\n-Message-Id: MESSAGE-ID-STRING\n+Message-ID: MESSAGE-ID-STRING\n X-Mailer: X-MAILER-STRING\n MIME-Version: 1.0\n Content-Transfer-Encoding: 8bit\n@@ -962,7 +962,7 @@ Cc: A <author@example.com>,\n \tC O Mitter <committer@example.com>\n Subject: [PATCH 1/1] Second.\n Date: DATE-STRING\n-Message-Id: MESSAGE-ID-STRING\n+Message-ID: MESSAGE-ID-STRING\n X-Mailer: X-MAILER-STRING\n MIME-Version: 1.0\n Content-Transfer-Encoding: 8bit\n@@ -992,7 +992,7 @@ Cc: A <author@example.com>,\n \tC O Mitter <committer@example.com>\n Subject: [PATCH 1/1] Second.\n Date: DATE-STRING\n-Message-Id: MESSAGE-ID-STRING\n+Message-ID: MESSAGE-ID-STRING\n X-Mailer: X-MAILER-STRING\n MIME-Version: 1.0\n Content-Transfer-Encoding: 8bit\n@@ -1477,7 +1477,7 @@ test_expect_success $PREREQ 'To headers from files reset each patch' '\n test_expect_success $PREREQ 'setup expect' '\n cat >email-using-8bit <<\\EOF\n From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001\n-Message-Id: <bogus-message-id@example.com>\n+Message-ID: <bogus-message-id@example.com>\n From: author@example.com\n Date: Sat, 12 Jun 2010 15:53:58 +0200\n Subject: subject goes here\n@@ -1563,7 +1563,7 @@ test_expect_success $PREREQ '--8bit-encoding overrides sendemail.8bitEncoding' '\n test_expect_success $PREREQ 'setup expect' '\n \tcat >email-using-8bit <<-\\EOF\n \tFrom fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001\n-\tMessage-Id: <bogus-message-id@example.com>\n+\tMessage-ID: <bogus-message-id@example.com>\n \tFrom: author@example.com\n \tDate: Sat, 12 Jun 2010 15:53:58 +0200\n \tSubject: Dieser Betreff enthält auch einen Umlaut!\n@@ -1592,7 +1592,7 @@ test_expect_success $PREREQ '--8bit-encoding also treats subject' '\n test_expect_success $PREREQ 'setup expect' '\n \tcat >email-using-8bit <<-\\EOF\n \tFrom fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001\n-\tMessage-Id: <bogus-message-id@example.com>\n+\tMessage-ID: <bogus-message-id@example.com>\n \tFrom: A U Thor <author@example.com>\n \tDate: Sat, 12 Jun 2010 15:53:58 +0200\n \tContent-Type: text/plain; charset=UTF-8\n@@ -1673,7 +1673,7 @@ test_expect_success $PREREQ '8-bit and sendemail.transferencoding=base64' '\n test_expect_success $PREREQ 'setup expect' '\n \tcat >email-using-qp <<-\\EOF\n \tFrom fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001\n-\tMessage-Id: <bogus-message-id@example.com>\n+\tMessage-ID: <bogus-message-id@example.com>\n \tFrom: A U Thor <author@example.com>\n \tDate: Sat, 12 Jun 2010 15:53:58 +0200\n \tMIME-Version: 1.0\n@@ -1699,7 +1699,7 @@ test_expect_success $PREREQ 'convert from quoted-printable to base64' '\n test_expect_success $PREREQ 'setup expect' \"\n tr -d '\\\\015' | tr '%' '\\\\015' >email-using-crlf <<EOF\n From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001\n-Message-Id: <bogus-message-id@example.com>\n+Message-ID: <bogus-message-id@example.com>\n From: A U Thor <author@example.com>\n Date: Sat, 12 Jun 2010 15:53:58 +0200\n Content-Type: text/plain; charset=UTF-8\n"},{"id":"442226","messageId":"211124.861r36e22f.gmgdl@evledraar.gmail.com","threadId":"56968","inReplyTo":"20211123185237.M476855@dcvr","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-11-24T02:08:28Z","receivedAt":"2021-11-24T02:10:22Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Tue, Nov 23 2021, Eric Wong wrote:\n\n> Thorsten Leemhuis <linux@leemhuis.info> wrote:\n>> diff --git a/Documentation/maintainer/configure-git.rst b/Documentation/maintainer/configure-git.rst\n>> index 80ae5030a590..8429d45d661c 100644\n>> --- a/Documentation/maintainer/configure-git.rst\n>> +++ b/Documentation/maintainer/configure-git.rst\n>\n> <snip>, +cc git@vger\n>\n>> @@ -56,7 +56,7 @@ by adding the following hook into your git:\n>>  \t$ cat >.git/hooks/applypatch-msg <<'EOF'\n>>  \t#!/bin/sh\n>>  \t. git-sh-setup\n>> -\tperl -pi -e 's|^Message-Id:\\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' \"$1\"\n>> +\tperl -pi -e 's|^Message-Id:\\s*<?([^>]+)>?$|Reviewed: https://lore.kernel.org/r/$1|g;' \"$1\"\n>\n> Side note: that regexp should match \"Message-ID\" case-insensitively.\n> git send-email is an outlier in its capitalization of \"Message-Id\",\n> most RFCs capitalize it \"Message-ID\", as do common MUAs.\n>\n> git send-email's capitalization does annoy me and I've looked\n> into changing it; but there's a bunch of tests and probably\n> dependent code that also need to be updated...\n\n\"git format-patch\" does it without send-email, but I see that send-email\nwill then parse its output, and would turn any capitalization into the\n\"Message-Id\" form again.\n\nWe could probably just have it preserve whatever capitalization it finds\nif there's an existing header, we wouldn't fix anything, but we'd move\nthe blame around a bit :)\n"},{"id":"442232","messageId":"20211124061210.GA3059@dcvr","threadId":"56968","inReplyTo":"xmqq4k825o6r.fsf@gitster.g","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Eric Wong","fromEmail":"e@80x24.org","sentAt":"2021-11-24T06:12:10Z","receivedAt":"2021-11-24T06:12:13Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n> Eric Wong <e@80x24.org> writes:\n> \n> > git send-email's capitalization does annoy me and I've looked\n> > into changing it; but there's a bunch of tests and probably\n> > dependent code that also need to be updated...\n> \n> It does annoy me, too, and I do not mind if it gets \"fixed\", but I\n> do not know if the cost for vetting a bulk update like that is worth\n> it.  There is another one outside send-email in log-tree.c that is\n> responsible for output from format-patch.\n\nI support updating the documentation in git, first; then perhaps\nmaking tests case-insensitive (which could be a complex\nchange...).\n\nUnfortunately, changing the send-email + log-tree.c code would\nbreak existing users of the applypatch-msg hook sample in\nlinux/Documentation/maintainer/configure-git.rst which has\nbeen case-sensitive for around for 2 years:\nhttps://lore.kernel.org/r/20191118223019.81708-1-linus.walleij@linaro.org\n\n:<\n"},{"id":"442344","messageId":"12cefa81-495b-3083-5f19-b319c704ebf7@leemhuis.info","threadId":"56968","inReplyTo":"20211123185237.M476855@dcvr","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Thorsten Leemhuis","fromEmail":"linux@leemhuis.info","sentAt":"2021-11-26T07:29:05Z","receivedAt":"2021-11-26T07:31:11Z","isPatch":true,"sender":{"key":"linux@leemhuis.info","avatar":null},"body":"Ccing Linus Walleij, who added this, and Kees, who apparently came up\nwith this originally.\n\nOn 23.11.21 19:52, Eric Wong wrote:\n> Thorsten Leemhuis <linux@leemhuis.info> wrote:\n>> diff --git a/Documentation/maintainer/configure-git.rst b/Documentation/maintainer/configure-git.rst\n>> index 80ae5030a590..8429d45d661c 100644\n>> --- a/Documentation/maintainer/configure-git.rst\n>> +++ b/Documentation/maintainer/configure-git.rst\n> \n> <snip>, +cc git@vger\n> \n>> @@ -56,7 +56,7 @@ by adding the following hook into your git:\n>>  \t$ cat >.git/hooks/applypatch-msg <<'EOF'\n>>  \t#!/bin/sh\n>>  \t. git-sh-setup\n>> -\tperl -pi -e 's|^Message-Id:\\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' \"$1\"\n>> +\tperl -pi -e 's|^Message-Id:\\s*<?([^>]+)>?$|Reviewed: https://lore.kernel.org/r/$1|g;' \"$1\"\n> \n> Side note: that regexp should match \"Message-ID\" case-insensitively.\n> git send-email is an outlier in its capitalization of \"Message-Id\",\n> most RFCs capitalize it \"Message-ID\", as do common MUAs.\n\nArgh :-/\n\nIt's still totally unclear if that or a similar patch will be accepted.\nAnd even if it is: the \"don't do two different things in one commit\"\nrule might not be that strict enforced when it comes to the Linux\nkernel's docs, but changing this regexp as part of another patch crosses\nthe line.\n\nIOW: we afaics need a separate patch to make the regexp\ncase-insensitively. Eric, do you want to submit one, as you brought it\nup? Or are there any other volunteers?\n\nCiao, Thorsten\n"},{"id":"442362","messageId":"211126.86h7bzhyfy.gmgdl@evledraar.gmail.com","threadId":"56968","inReplyTo":"xmqq4k825o6r.fsf@gitster.g","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-11-26T12:49:16Z","receivedAt":"2021-11-26T13:37:24Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Tue, Nov 23 2021, Junio C Hamano wrote:\n\n> Eric Wong <e@80x24.org> writes:\n>\n>> git send-email's capitalization does annoy me and I've looked\n>> into changing it; but there's a bunch of tests and probably\n>> dependent code that also need to be updated...\n> [...]\n> diff --git i/git-send-email.perl w/git-send-email.perl\n> index 5262d88ee3..a61134c7d3 100755\n> --- i/git-send-email.perl\n> +++ w/git-send-email.perl\n> @@ -1494,7 +1494,7 @@ sub send_message {\n>  To: $to${ccline}\n>  Subject: $subject\n>  Date: $date\n> -Message-Id: $message_id\n> +Message-ID: $message_id\n>  \";\n>  \tif ($use_xmailer) {\n>  \t\t$header .= \"X-Mailer: git-send-email $gitversion\\n\";\n\nPerhaps one way to split this & make it more readable is to split this,\ni.e. the mesage-id's send-email itself generates & tests, usually it\npasses along format-patch's.\n\n> @@ -1789,7 +1789,7 @@ sub process_file {\n>  \t\t\t\t$has_mime_version = 1;\n>  \t\t\t\tpush @xh, $_;\n>  \t\t\t}\n> -\t\t\telsif (/^Message-Id: (.*)/i) {\n> +\t\t\telsif (/^Message-ID: (.*)/i) {\n>  \t\t\t\t$message_id = $1;\n>  \t\t\t}\n>  \t\t\telsif (/^Content-Transfer-Encoding: (.*)/i) {\n\nNot strictly needed due to the /i, maybe splitting out cosmetic changes\nwould be better?\n\nI also notice we have various hits for \"git grep message-id\", including\nregex checks you didn't update here.\n"},{"id":"442366","messageId":"20211126171141.GA21826@dcvr","threadId":"56968","inReplyTo":"12cefa81-495b-3083-5f19-b319c704ebf7@leemhuis.info","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Eric Wong","fromEmail":"e@80x24.org","sentAt":"2021-11-26T17:11:41Z","receivedAt":"2021-11-26T17:13:43Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Thorsten Leemhuis <linux@leemhuis.info> wrote:\n> Ccing Linus Walleij, who added this, and Kees, who apparently came up\n> with this originally.\n> \n> On 23.11.21 19:52, Eric Wong wrote:\n> > Thorsten Leemhuis <linux@leemhuis.info> wrote:\n> >> diff --git a/Documentation/maintainer/configure-git.rst b/Documentation/maintainer/configure-git.rst\n> >> index 80ae5030a590..8429d45d661c 100644\n> >> --- a/Documentation/maintainer/configure-git.rst\n> >> +++ b/Documentation/maintainer/configure-git.rst\n> > \n> > <snip>, +cc git@vger\n> > \n> >> @@ -56,7 +56,7 @@ by adding the following hook into your git:\n> >>  \t$ cat >.git/hooks/applypatch-msg <<'EOF'\n> >>  \t#!/bin/sh\n> >>  \t. git-sh-setup\n> >> -\tperl -pi -e 's|^Message-Id:\\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' \"$1\"\n> >> +\tperl -pi -e 's|^Message-Id:\\s*<?([^>]+)>?$|Reviewed: https://lore.kernel.org/r/$1|g;' \"$1\"\n> > \n> > Side note: that regexp should match \"Message-ID\" case-insensitively.\n> > git send-email is an outlier in its capitalization of \"Message-Id\",\n> > most RFCs capitalize it \"Message-ID\", as do common MUAs.\n> \n> Argh :-/\n> \n> It's still totally unclear if that or a similar patch will be accepted.\n> And even if it is: the \"don't do two different things in one commit\"\n> rule might not be that strict enforced when it comes to the Linux\n> kernel's docs, but changing this regexp as part of another patch crosses\n> the line.\n> \n> IOW: we afaics need a separate patch to make the regexp\n> case-insensitively. Eric, do you want to submit one, as you brought it\n> up? Or are there any other volunteers?\n\nI suggest you turn this into a 2 patch series to avoid conflicts\nfor a trivial change.  I don't even have a kernel worktree handy\nat the moment (ENOSPC :x)\n"},{"id":"442405","messageId":"42ff6b8d-0b7c-12e0-4648-a9232b0f577c@leemhuis.info","threadId":"56968","inReplyTo":"20211126171141.GA21826@dcvr","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Thorsten Leemhuis","fromEmail":"linux@leemhuis.info","sentAt":"2021-11-27T19:32:37Z","receivedAt":"2021-11-27T19:34:45Z","isPatch":true,"sender":{"key":"linux@leemhuis.info","avatar":null},"body":"On 26.11.21 18:11, Eric Wong wrote:\n> Thorsten Leemhuis <linux@leemhuis.info> wrote:\n>> Ccing Linus Walleij, who added this, and Kees, who apparently came up\n>> with this originally.\n>>\n>> On 23.11.21 19:52, Eric Wong wrote:\n>>> Thorsten Leemhuis <linux@leemhuis.info> wrote:\n>>>> diff --git a/Documentation/maintainer/configure-git.rst b/Documentation/maintainer/configure-git.rst\n>>>> index 80ae5030a590..8429d45d661c 100644\n>>>> --- a/Documentation/maintainer/configure-git.rst\n>>>> +++ b/Documentation/maintainer/configure-git.rst\n>>>\n>>> <snip>, +cc git@vger\n>>>\n>>>> @@ -56,7 +56,7 @@ by adding the following hook into your git:\n>>>>  \t$ cat >.git/hooks/applypatch-msg <<'EOF'\n>>>>  \t#!/bin/sh\n>>>>  \t. git-sh-setup\n>>>> -\tperl -pi -e 's|^Message-Id:\\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' \"$1\"\n>>>> +\tperl -pi -e 's|^Message-Id:\\s*<?([^>]+)>?$|Reviewed: https://lore.kernel.org/r/$1|g;' \"$1\"\n>>>\n>>> Side note: that regexp should match \"Message-ID\" case-insensitively.\n>>> git send-email is an outlier in its capitalization of \"Message-Id\",\n>>> most RFCs capitalize it \"Message-ID\", as do common MUAs.\n>>\n>> Argh :-/\n>>\n>> It's still totally unclear if that or a similar patch will be accepted.\n>> And even if it is: the \"don't do two different things in one commit\"\n>> rule might not be that strict enforced when it comes to the Linux\n>> kernel's docs, but changing this regexp as part of another patch crosses\n>> the line.\n>>\n>> IOW: we afaics need a separate patch to make the regexp\n>> case-insensitively. Eric, do you want to submit one, as you brought it\n>> up? Or are there any other volunteers?\n> \n> I suggest you turn this into a 2 patch series to avoid conflicts\n> for a trivial change.  I don't even have a kernel worktree handy\n> at the moment (ENOSPC :x)\n\n:-D\n\nWill do this in a couple of days, unless Linus or Kees speak up.\n\nJust to be sure I'll do what you expect to be done: I assume you want to see\nit changed like this?\n\n-\tperl -pi -e 's|^Message-Id:\\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' \"$1\"\n+\tperl -pi -e 's|^Message-I[dD]:\\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' \"$1\"\n\nOr are there even more variants of Message-ID out there known that\nneed to be taken into account?\n\nCiao, Thorsten\n"},{"id":"442406","messageId":"20211127195231.GA4636@dcvr","threadId":"56968","inReplyTo":"42ff6b8d-0b7c-12e0-4648-a9232b0f577c@leemhuis.info","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Eric Wong","fromEmail":"e@80x24.org","sentAt":"2021-11-27T19:52:31Z","receivedAt":"2021-11-27T19:54:36Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Thorsten Leemhuis <linux@leemhuis.info> wrote:\n> Just to be sure I'll do what you expect to be done: I assume you want to see\n> it changed like this?\n> \n> -\tperl -pi -e 's|^Message-Id:\\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' \"$1\"\n> +\tperl -pi -e 's|^Message-I[dD]:\\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' \"$1\"\n> \n> Or are there even more variants of Message-ID out there known that\n> need to be taken into account?\n\nThe entire match should be case-insensitive[1], so I'd add `i'\nat the end:\n\n\tperl -pi -e 's|^Message-ID:\\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|gi;' \"$1\"\n\nFwiw, every mail and HTTP/1.x header parser I've looked at works\ncase-insensitively.  Also, I'm not sure if `g' is needed, actually...\n\n[1] https://datatracker.ietf.org/doc/html/rfc822#section-3.4.7\n"},{"id":"442407","messageId":"xmqqtufx5p19.fsf@gitster.g","threadId":"56968","inReplyTo":"20211127195231.GA4636@dcvr","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-11-27T20:20:18Z","receivedAt":"2021-11-27T20:22:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <e@80x24.org> writes:\n\n> Thorsten Leemhuis <linux@leemhuis.info> wrote:\n>> Just to be sure I'll do what you expect to be done: I assume you want to see\n>> it changed like this?\n>> \n>> -\tperl -pi -e 's|^Message-Id:\\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' \"$1\"\n> ...\n> The entire match should be case-insensitive[1], so I'd add `i'\n> at the end:\n>\n> \tperl -pi -e 's|^Message-ID:\\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|gi;' \"$1\"\n>\n> Fwiw, every mail and HTTP/1.x header parser I've looked at works\n> case-insensitively.  Also, I'm not sure if `g' is needed, actually...\n\nIt is left anchored with \"^\" so it would be hard to match more than\nonce on the same line ;-)\n\nI agree that it is the right solution to make the whole thing\ncase-insensitive by adding 'i' at the end.\n\nFWIW, the RFC first says this:\n\n    1.2.2. Syntactic notation\n\n       This standard uses the Augmented Backus-Naur Form (ABNF) notation\n       specified in [RFC2234] for the formal definitions of the syntax of\n       messages.  Characters will be specified either by a decimal value\n       (e.g., the value %d65 for uppercase A and %d97 for lowercase A) or by\n       a case-insensitive literal value enclosed in quotation marks (e.g.,\n       \"A\" for either uppercase or lowercase A).\n\nand then goes on to define how message-id should look like.\n\n    3.6.4. Identification fields\n\n    message-id      =       \"Message-ID:\" msg-id CRLF\n\n\nBut if you go the \"add /i at the end\" route, you do not have to\nupcase \"d\" to \"D\" and that may reduce the patch noise (it only\nmatters if the patch viewer highlights letter-by-letter changes for\nyour recipients).\n\nHTH\n"},{"id":"442438","messageId":"87mtlnjhj6.fsf@intel.com","threadId":"56968","inReplyTo":"xmqqtufx5p19.fsf@gitster.g","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Jani Nikula","fromEmail":"jani.nikula@intel.com","sentAt":"2021-11-29T12:03:09Z","receivedAt":"2021-11-29T12:05:30Z","isPatch":true,"sender":{"key":"jani.nikula@intel.com","avatar":null},"body":"On Sat, 27 Nov 2021, Junio C Hamano <gitster@pobox.com> wrote:\n> Eric Wong <e@80x24.org> writes:\n>\n>> Thorsten Leemhuis <linux@leemhuis.info> wrote:\n>>> Just to be sure I'll do what you expect to be done: I assume you want to see\n>>> it changed like this?\n>>> \n>>> -\tperl -pi -e 's|^Message-Id:\\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' \"$1\"\n>> ...\n>> The entire match should be case-insensitive[1], so I'd add `i'\n>> at the end:\n>>\n>> \tperl -pi -e 's|^Message-ID:\\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|gi;' \"$1\"\n>>\n>> Fwiw, every mail and HTTP/1.x header parser I've looked at works\n>> case-insensitively.  Also, I'm not sure if `g' is needed, actually...\n>\n> It is left anchored with \"^\" so it would be hard to match more than\n> once on the same line ;-)\n>\n> I agree that it is the right solution to make the whole thing\n> case-insensitive by adding 'i' at the end.\n>\n> FWIW, the RFC first says this:\n>\n>     1.2.2. Syntactic notation\n>\n>        This standard uses the Augmented Backus-Naur Form (ABNF) notation\n>        specified in [RFC2234] for the formal definitions of the syntax of\n>        messages.  Characters will be specified either by a decimal value\n>        (e.g., the value %d65 for uppercase A and %d97 for lowercase A) or by\n>        a case-insensitive literal value enclosed in quotation marks (e.g.,\n>        \"A\" for either uppercase or lowercase A).\n>\n> and then goes on to define how message-id should look like.\n>\n>     3.6.4. Identification fields\n>\n>     message-id      =       \"Message-ID:\" msg-id CRLF\n>\n>\n> But if you go the \"add /i at the end\" route, you do not have to\n> upcase \"d\" to \"D\" and that may reduce the patch noise (it only\n> matters if the patch viewer highlights letter-by-letter changes for\n> your recipients).\n\nFrom the RFC nitpicking department, msg-id is allowed to contain CFWS\n(comments and folding white space) outside the angle brackets, which\nmeans you could have RFC compliant Message-ID header field:\n\nMessage-ID: \n  <message-id@example.com>\n\nor\n\nMessage-ID: (comment) \n  <message-id@example.com>\n\nor even worse, really.\n\nThe moral of the story is that you should always offload the header\nparsing to some tool or library designed to do that.\n\n\nBR,\nJani.\n\n\n-- \nJani Nikula, Intel Open Source Graphics Center\n"},{"id":"442449","messageId":"xmqq5ysa5193.fsf@gitster.g","threadId":"56968","inReplyTo":"87mtlnjhj6.fsf@intel.com","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-11-29T17:18:32Z","receivedAt":"2021-11-29T17:20:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jani Nikula <jani.nikula@intel.com> writes:\n\n> From the RFC nitpicking department, ...\n>\n> Message-ID: (comment) \n>   <message-id@example.com>\n\nThanks for a fun piece; the (comment) is quite interesting.\n\nI wasn't having fun with RFC nitpicking, though.  I was reacting to\nthis part of the message I was responding to ...\n\n>>> Fwiw, every mail and HTTP/1.x header parser I've looked at works\n>>> case-insensitively.  Also, I'm not sure if `g' is needed, actually...\n\n... to say that \"works case-insensitively\" may not just be\nempirically correct, but RFC backs him up, to Eric.\n"},{"id":"442450","messageId":"20211129172618.GA26651@dcvr","threadId":"56968","inReplyTo":"87mtlnjhj6.fsf@intel.com","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Eric Wong","fromEmail":"e@80x24.org","sentAt":"2021-11-29T17:26:18Z","receivedAt":"2021-11-29T17:28:25Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Jani Nikula <jani.nikula@intel.com> wrote:\n> From the RFC nitpicking department, msg-id is allowed to contain CFWS\n> (comments and folding white space) outside the angle brackets, which\n> means you could have RFC compliant Message-ID header field:\n> \n> Message-ID: \n>   <message-id@example.com>\n> \n> or\n> \n> Message-ID: (comment) \n>   <message-id@example.com>\n> \n> or even worse, really.\n> \n> The moral of the story is that you should always offload the header\n> parsing to some tool or library designed to do that.\n\nIt's a bit much for common cases with git-send-email and\nreasonable MUAs, I think.  I don't know if formail is commonly\ninstalled, nowadays...\n\nFwiw, the code running lore uses something like this:\n\n\t/^Message-ID:[ \\t]*([^\\n]*\\r?\\n # 1st line\n\t\t\t# continuation lines:\n\t\t\t(?:[^:\\n]*?[ \\t]+[^\\n]*\\r?\\n)*)\n\t\t\t/ismx\n\nI'm fine with this non-trivial regexp being included with\nGPL-2.0 code; but it could be too big for a one-liner *shrug*\n\n... And <([^>]+)>/s to extract Message-IDs, but ISTR the code\nbehind lore doesn't handle spaces inside <> properly, but I'm\nnot sure if there's enough valid, non-spam messages with them...\n"},{"id":"442472","messageId":"87a6hmkbxu.fsf@intel.com","threadId":"56968","inReplyTo":"xmqq5ysa5193.fsf@gitster.g","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Jani Nikula","fromEmail":"jani.nikula@intel.com","sentAt":"2021-11-29T19:18:37Z","receivedAt":"2021-11-29T19:22:33Z","isPatch":true,"sender":{"key":"jani.nikula@intel.com","avatar":null},"body":"On Mon, 29 Nov 2021, Junio C Hamano <gitster@pobox.com> wrote:\n> I wasn't having fun with RFC nitpicking, though.\n\nI didn't mean to imply you were, I was saying I was!\n\nBR,\nJani.\n\n\n-- \nJani Nikula, Intel Open Source Graphics Center\n"},{"id":"442473","messageId":"877dcqkbvj.fsf@intel.com","threadId":"56968","inReplyTo":"20211129172618.GA26651@dcvr","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Jani Nikula","fromEmail":"jani.nikula@intel.com","sentAt":"2021-11-29T19:20:00Z","receivedAt":"2021-11-29T19:27:07Z","isPatch":true,"sender":{"key":"jani.nikula@intel.com","avatar":null},"body":"On Mon, 29 Nov 2021, Eric Wong <e@80x24.org> wrote:\n> Jani Nikula <jani.nikula@intel.com> wrote:\n>> The moral of the story is that you should always offload the header\n>> parsing to some tool or library designed to do that.\n>\n> It's a bit much for common cases with git-send-email and\n> reasonable MUAs, I think.\n\nI think you can have unreasonable MDAs in between, though!\n\nBR,\nJani.\n\n\n-- \nJani Nikula, Intel Open Source Graphics Center\n"},{"id":"442485","messageId":"20211129121004.64cf125f@gandalf.local.home","threadId":"56968","inReplyTo":"87mtlnjhj6.fsf@intel.com","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Steven Rostedt","fromEmail":"rostedt@goodmis.org","sentAt":"2021-11-29T17:10:04Z","receivedAt":"2021-11-29T20:34:46Z","isPatch":true,"sender":{"key":"rostedt@goodmis.org","avatar":"https://gravatar.com/avatar/cc188bf330d625ec6a7a2d0b6f4829dc777963e8dab83d943691dc31c5095227?d=mp&s=160"},"body":"On Mon, 29 Nov 2021 14:03:09 +0200\nJani Nikula <jani.nikula@intel.com> wrote:\n\n> >From the RFC nitpicking department, msg-id is allowed to contain CFWS  \n> (comments and folding white space) outside the angle brackets, which\n> means you could have RFC compliant Message-ID header field:\n> \n> Message-ID: \n>   <message-id@example.com>\n\nMy scripts have already been hit by this. (I've been lazy and not fixed it,\nbut instead, just edit the file that it is parsing manually, to be on one\nline :-p)\n\n-- Steve\n"},{"id":"442617","messageId":"CAMuHMdWygx9kTemsrZdru-ieYyJXm=8276Q_ZSxZGkqsu5OWVg@mail.gmail.com","threadId":"56968","inReplyTo":"20211129172618.GA26651@dcvr","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Geert Uytterhoeven","fromEmail":"geert@linux-m68k.org","sentAt":"2021-11-30T08:24:14Z","receivedAt":"2021-11-30T08:24:28Z","isPatch":true,"sender":{"key":"geert@linux-m68k.org","avatar":"https://gravatar.com/avatar/8105b34f653a7b5b98e225e565b11ebcc762ad4ab1a9d905a4663db029a9e6bc?d=mp&s=160"},"body":"Hi Eric,\n\nOn Mon, Nov 29, 2021 at 11:29 PM Eric Wong <e@80x24.org> wrote:\n> It's a bit much for common cases with git-send-email and\n> reasonable MUAs, I think.  I don't know if formail is commonly\n> installed, nowadays...\n\nOf course ;-) You need it to run checkpatch on patch series obtained\nthrough \"b4 am\", before you apply them to your tree:\n\n$ cat *mbx | formail -s scripts/checkpatch.pl\n\nGr{oetje,eeting}s,\n\n                        Geert\n\n--\nGeert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org\n\nIn personal conversations with technical people, I call myself a hacker. But\nwhen I'm talking to journalists I just say \"programmer\" or something like that.\n                                -- Linus Torvalds\n"},{"id":"443442","messageId":"af5ee2e8-cd59-fc9a-35fa-6fec1fc9aa33@leemhuis.info","threadId":"56968","inReplyTo":"CAMuHMdWygx9kTemsrZdru-ieYyJXm=8276Q_ZSxZGkqsu5OWVg@mail.gmail.com","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Thorsten Leemhuis","fromEmail":"linux@leemhuis.info","sentAt":"2021-12-08T13:41:41Z","receivedAt":"2021-12-08T13:41:52Z","isPatch":true,"sender":{"key":"linux@leemhuis.info","avatar":null},"body":"Hi Eric!\n\nOn 30.11.21 09:24, Geert Uytterhoeven wrote:\n> On Mon, Nov 29, 2021 at 11:29 PM Eric Wong <e@80x24.org> wrote:\n>> It's a bit much for common cases with git-send-email and\n>> reasonable MUAs, I think.  I don't know if formail is commonly\n>> installed, nowadays...\n\nWell, after your earlier suggestion I considered to go with this:\n\n-\tperl -pi -e 's|^Message-Id:\\s*<?([^>]+)>?$|Link:\nhttps://lore.kernel.org/r/$1|g;' \"$1\"\n+\tperl -pi -e 's|^Message-ID:\\s*<?([^>]+)>?$|Link:\nhttps://lore.kernel.org/r/$1|i;' \"$1\"\n\nBut...\n\n> Of course ;-) You need it to run checkpatch on patch series obtained\n> through \"b4 am\", before you apply them to your tree:\n> \n> $ cat *mbx | formail -s scripts/checkpatch.pl\n\n...this made me wonder if formail would be the better solution. I came\nup with this:\n\nformail -A \"Link: https://lore.kernel.org/r/`formail -c -x Message-ID <\n\"${1}\" | sed 's!.*<\\(.*\\)>!\\1!'`\" < \"${1}\" | sponge \"${1}\"\n\nDownsides: instead of perl it requires sed and sponge (part of\nmoreutils, which I guess not everyone has installed; but I tried to\navoid a big here document or moving files around).\n\nIs that worth it? Or is there a way to realize this in a more elegant\nfashion with tools everyone has installed?\n\nCiao, Thorsten\n"},{"id":"443482","messageId":"20211208170226.GA12748@dcvr","threadId":"56968","inReplyTo":"af5ee2e8-cd59-fc9a-35fa-6fec1fc9aa33@leemhuis.info","subject":"Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'","fromName":"Eric Wong","fromEmail":"e@80x24.org","sentAt":"2021-12-08T17:02:26Z","receivedAt":"2021-12-08T17:02:31Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Thorsten Leemhuis <linux@leemhuis.info> wrote:\n> On 30.11.21 09:24, Geert Uytterhoeven wrote:\n> > On Mon, Nov 29, 2021 at 11:29 PM Eric Wong <e@80x24.org> wrote:\n> >> It's a bit much for common cases with git-send-email and\n> >> reasonable MUAs, I think.  I don't know if formail is commonly\n> >> installed, nowadays...\n> \n> Well, after your earlier suggestion I considered to go with this:\n> \n> -\tperl -pi -e 's|^Message-Id:\\s*<?([^>]+)>?$|Link:\n> https://lore.kernel.org/r/$1|g;' \"$1\"\n> +\tperl -pi -e 's|^Message-ID:\\s*<?([^>]+)>?$|Link:\n> https://lore.kernel.org/r/$1|i;' \"$1\"\n> \n> But...\n> \n> > Of course ;-) You need it to run checkpatch on patch series obtained\n> > through \"b4 am\", before you apply them to your tree:\n> > \n> > $ cat *mbx | formail -s scripts/checkpatch.pl\n> \n> ...this made me wonder if formail would be the better solution. I came\n> up with this:\n> \n> formail -A \"Link: https://lore.kernel.org/r/`formail -c -x Message-ID <\n> \"${1}\" | sed 's!.*<\\(.*\\)>!\\1!'`\" < \"${1}\" | sponge \"${1}\"\n> \n> Downsides: instead of perl it requires sed and sponge (part of\n> moreutils, which I guess not everyone has installed; but I tried to\n> avoid a big here document or moving files around).\n\nAs Geert noted, formail is probably reasonable, but I certainly\ndon't have moreutils across all the systems I'm using right now.\n\n> Is that worth it? Or is there a way to realize this in a more elegant\n> fashion with tools everyone has installed?\n\n*shrug*  Since newlines after ':' are a concern and it's (probably :P)\nsafe to slurp entire contents of emails into memory nowadays;\nsome minor tweaks to the original perl invocation should work:\n\n* use `$/ = undef' to force Perl to operate on the entire input at once\n* use `m' RE modifier to ensure `^' and `$' still match SOL/EOL\n  ($/ is only the input record separator, it doesn't change\n   Perl's definition of \"lines\" for `^' and `$')\n\nperl -i -p -e 'BEGIN{$/=undef};s|^Message-ID:\\s*<?([^>]+)>?$|Link:\n https://lore.kernel.org/r/$1|im;'\n"}]}