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

Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'

From
EWEric Wong <e@80x24.org>
Date
Nov 27, 2021, 19:52 UTC
Message-ID
<20211127195231.GA4636@dcvr>
In-Reply-To
<42ff6b8d-0b7c-12e0-4648-a9232b0f577c@leemhuis.info>
Thorsten Leemhuis <linux@leemhuis.info> wrote:
Show 8 quoted lines
> 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?

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
Previous: Thorsten LeemhuisNext: Junio C Hamano
Message 9 of 19 in “Re: [RFC PATCH v1 1/1] docs: add the new commit-msg tags 'Reported:' and 'Reviewed:'”
  1. Eric WongNov 23, 2021
  2. Junio C HamanoNov 24, 2021
  3. Eric WongNov 24, 2021
  4. Ævar Arnfjörð BjarmasonNov 26, 2021
  5. Ævar Arnfjörð BjarmasonNov 24, 2021
  6. Thorsten LeemhuisNov 26, 2021
  7. Eric WongNov 26, 2021
  8. Thorsten LeemhuisNov 27, 2021
  9. Eric WongNov 27, 2021
  10. Junio C HamanoNov 27, 2021
  11. Jani NikulaNov 29, 2021
  12. Junio C HamanoNov 29, 2021
  13. Jani NikulaNov 29, 2021
  14. Eric WongNov 29, 2021
  15. Jani NikulaNov 29, 2021
  16. Geert UytterhoevenNov 30, 2021
  17. Thorsten LeemhuisDec 8, 2021
  18. Eric WongDec 8, 2021
  19. Steven RostedtNov 29, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.