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

Re: More builtin git-am issues..

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Sep 5, 2015, 01:06 UTC
Message-ID
<CA+55aFw-PObyj2boqpeA9DDcKeAuCGouT7Qd2Zw02+sxvd2CgA@mail.gmail.com>
In-Reply-To
<xmqqh9n9ele4.fsf@gitster.mtv.corp.google.com>
On Fri, Sep 4, 2015 at 5:54 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
>
> How about a bit looser rule like this?
>
>     A block of text at the end of the message, each and every
>     line in which must match "^[^:      ]+:[      ]" (that is,
>     a "keyword" that does not contain a whitespace nor a colon,
>     followed by a colon and whitespace, and arbitrary value thru
>     the end of line) is a signature block.
No. That's still broken.

The thing is, and that was what the report was all about, not every line _is_ of that format. We have commetns from the sign-off people. Things like this:

    Signed-off-by: Noam Camus <noamc@ezchip.com>
    Acked-by: Vineet Gupta <vgupta@synopsys.com>
    [ Also removed pointless cast from "void *".  - Linus ]
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
or
    Signed-off-by: Andi Kleen <ak@linux.intel.com>
    [ Updated comments and changelog a bit. ]
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Link: http://lkml.kernel.org/r/1424225886-18652-3-git-send-email-andi@firstfloor.org
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
so no, it is simply not true that "every line must match".

I'm not even seeing why you argue for that, since clearly having a sign-off-line is actually a safer choice too. The "every line must match" rule is bad, not just because it's not true like above, but also because it can be true without it being a sign-off block.

For example, it's not at all unlikely that you have perfectly normal comments that just list some subsystem and their changes. Which could easily look like

   Trivial fixes all over the tree
   drm: fix whitespace
   mm: speeling errors
   kernel: indentation and codign style
The above looks like a perfectly sane commit log to me.

Do you seriously think that it makes for a better "sign-off block test" than one that actually checks for "is there a sign-off line"?

I'd much rather have special cases like testing for specific keywords or looking for things that look like emails, than make it about being "every line has this very generic format".

                     Linus
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 30 in “More builtin git-am issues..”
  1. Linus TorvaldsSep 4, 2015
  2. Linus TorvaldsSep 4, 2015
  3. Jeff KingSep 5, 2015
  4. Linus TorvaldsSep 5, 2015
  5. Junio C HamanoSep 5, 2015
  6. Linus TorvaldsSep 5, 2015
  7. Junio C HamanoSep 5, 2015
  8. Linus TorvaldsSep 5, 2015
  9. Junio C HamanoSep 5, 2015
  10. Johannes SixtSep 5, 2015
  11. Jeff KingSep 5, 2015
  12. Junio C HamanoSep 5, 2015
  13. Junio C HamanoSep 5, 2015
  14. Junio C HamanoSep 5, 2015
  15. Junio C HamanoSep 5, 2015
  16. Christian CouderSep 7, 2015
  17. Junio C HamanoSep 5, 2015
  18. Junio C HamanoSep 5, 2015
  19. Junio C HamanoSep 5, 2015
  20. Linus TorvaldsSep 5, 2015
  21. Junio C HamanoSep 5, 2015
  22. am: match --signoff to the original scripted versionJunio C Hamano, Sep 6, 2015
  23. Paul TanSep 6, 2015
  24. Junio C HamanoSep 6, 2015
  25. Jeff KingSep 8, 2015
  26. Paul TanSep 6, 2015
  27. Junio C HamanoSep 6, 2015
  28. Linus TorvaldsSep 6, 2015
  29. Jeff KingSep 8, 2015
  30. Junio C HamanoSep 8, 2015

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.