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

Re: [PATCH] commit & merge: modularize the empty message validator

From
Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Date
Jul 15, 2017, 08:33 UTC
Message-ID
<1500107583.1850.4.camel@gmail.com>
In-Reply-To
<1500054552.18990.8.camel@gmail.com>
On Fri, 2017-07-14 at 23:19 +0530, Kaartic Sivaraam wrote:
Show 10 quoted lines
>         * Imagine a hypothetical version of git that aborts when the
>         <message> is empty though a <trailer> is present. This would
>         quite possibly instigate controversies as the "hypothetical git"
>         reduces the "valid commit messages" and would quite possibly
>         reject a commit message as "empty" (which is uncommunicative)
>         though a previous version (which did not have this change)
>         accepted a similar message.
> 
>         SO, bringing in the Occam's razor, let's choose the option that's
>         the simplest and makes the fewest assumptions.

I would like to add a little to the "making fewer assumptions" point. If we make the fewest assumptions possible, it has quite a few advantages,

* It would make the implementation that checks for an empty message,
trivial. Thus reducing the complexity of the code.
* It would not overload the meaning of the error message,
    Aborting due to empty commit message.

Thus making the sentence stand for what it means "literally".  (BTW, I guess an "an" is missing in the message)

* It allows for others to have more freedom in defining what a commit
message should have using the appropriate hook(s). IOW, let us do the
minimal check(message consisting only of whitespaces) and let the
others define what a commit message should have using the "commit-msg"
hook.
-- 
Kaartic
Previous: Kaartic SivaraamNext: Kaartic Sivaraam
Message 18 of 24 in “Why doesn't merge fail if message has only sign-off?”
  1. Kaartic SivaraamJul 2, 2017
  2. Junio C HamanoJul 3, 2017
  3. Kaartic SivaraamJul 4, 2017
  4. merge-message: change meaning of "empty merge message"Kaartic Sivaraam, Jul 6, 2017
  5. Kevin DaudtJul 6, 2017
  6. Kaartic SivaraamJul 6, 2017
  7. commit & merge: modularize the empty message validatorKaartic Sivaraam, Jul 11, 2017
  8. Kaartic SivaraamJul 11, 2017
  9. Junio C HamanoJul 11, 2017
  10. Kaartic SivaraamJul 13, 2017
  11. Junio C HamanoJul 13, 2017
  12. Kaartic SivaraamJul 14, 2017
  13. Christian BrabandtJul 17, 2017
  14. Junio C HamanoJul 17, 2017
  15. Kaartic SivaraamJul 13, 2017
  16. Junio C HamanoJul 13, 2017
  17. Kaartic SivaraamJul 14, 2017
  18. Kaartic SivaraamJul 15, 2017
  19. branch: change the error messages to be more meaningfulKaartic Sivaraam, Aug 21, 2017
  20. Kaartic SivaraamAug 21, 2017
  21. commit: change the meaning of an empty commit messageKaartic Sivaraam, Aug 21, 2017
  22. Junio C HamanoAug 24, 2017
  23. Kaartic SivaraamAug 31, 2017
  24. Kaartic SivaraamOct 2, 2017

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.