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

Re: Re : 2 questions on git-send-email usage

From
Junio C Hamano <junkio@cox.net>
Date
Jul 12, 2006, 16:24 UTC
Message-ID
<7v1wsqzt8f.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0607120834200.5623@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 17 quoted lines
> Yes. However, I think the sign-off detection is a bit broken (quite 
> independently of your patch).
>
> A number of people end up capitalizing the sign-off differently, so you 
> have lines like "Signed-Off-By: Xy Zzy <xyzzy@example.org>".
>
> Also, at least for the kernel, we often have alternative formats, like
>
> 	Acked-by: Elliot Xavier Ample <example@dummy.org>
>
> and for that case, adding the extra newline is actually bad.
>
> So I would suggest a totally different approach: instead of using 
> "strstr(comments, signed_off_by)", it would probably be much better to 
> just look for the last non-empty line, and see if it matches the format
>
> 	"^[nonspace]*: .*@.*$"

Documentation/SubmittingPatches (the kernel one) does not show the ugly Camel-Case-With-Hyphen spelling, and I've been wondring why people do that. A hidden agenda by me was to migrate people away from that practice, but that is an independent issue ;-).

I like your "detect lines that looks like a RFC2822 header that has some e-mail address" approach quite a lot.

Previous: Junio C HamanoNext: Linus Torvalds
Message 7 of 10 in “Re : 2 questions on git-send-email usage”
  1. moreau francisJul 11, 2006
  2. Franck Bui-HuuJul 11, 2006
  3. Junio C HamanoJul 11, 2006
  4. Franck Bui-HuuJul 12, 2006
  5. Linus TorvaldsJul 12, 2006
  6. Junio C HamanoJul 12, 2006
  7. Junio C HamanoJul 12, 2006
  8. Linus TorvaldsJul 12, 2006
  9. Junio C HamanoJul 13, 2006
  10. Linus TorvaldsJul 13, 2006

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.