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 29, 2021, 17:26 UTC
Message-ID
<20211129172618.GA26651@dcvr>
In-Reply-To
<87mtlnjhj6.fsf@intel.com>
Jani Nikula <jani.nikula@intel.com> wrote:
Show 16 quoted lines
> 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: 
>   <message-id@example.com>
> 
> or
> 
> Message-ID: (comment) 
>   <message-id@example.com>
> 
> 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...

Previous: Jani NikulaNext: Jani Nikula
Message 14 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.