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

Re: [PATCH] Add option to git-commit to allow empty log messages

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Apr 4, 2010, 23:53 UTC
Message-ID
<y2j51dd1af81004041653g9a09915el60104c575dcf6481@mail.gmail.com>
In-Reply-To
<20100404224324.GB12655@gmail.com>

In retrospect I probably should have sent a [PATCH RFC], this is obviously somewhat of a delicate subject.

On Sun, Apr 4, 2010 at 21:21, Shawn Pearce <spearce@spearce.org> wrote:
> Isn't this exactly why git-commit-tree exists?  I don't really see a reason
> to support scripting the porcelain git commit.

It's not so much about supporting scripting as exporting the capabilities of the porcelain to the frontend utilities without artificial limitations.

On Sun, Apr 4, 2010 at 22:43, David Aguilar <davvid@gmail.com> wrote:
Show 7 quoted lines
> On Sun, Apr 04, 2010 at 02:49:16PM +0000, Ævar Arnfjörð Bjarmason wrote:
>> Change git-commit(1) to accept a --allow-empty-message option
>> analogous to the existing --allow-empty option which allows empty
>> trees. This is mainly for compatability with foreign SCM systems.
>
> Is there any reason why the git commit-tree plumbing didn't
> suffice?

I encountered this limitation most recently while using hacking snerp-vortex which uses git-commit(1) directly. While it should ideally use git-commit-tree(1) or git-fast-import(1) it was easier at the time to do:

    message ||= "Git made me";

I thought it was silly that I had to either do that to fix an otherwise working piece of software or rewrite how it does commits, hence the patch.

> It's hard enough to get co-workers to write good commit
> messages.  I wouldn't want to encourage them to skip writing
> them altogether (by the existence of this feature).

I'm a big fan of good commit messages, that's another reason why I think this feature is a good idea.

I've read too many commit messages from people who're obviously determined not to write any, but are being forced to do so by their tools. Favorites include "more updates", "some changes", "..." (the list goes on). I'd rather get nothing at all from those people than more meaningless drivel. It would increase the signal-to-noise ratio of git-log(1) output.

Previous: David AguilarNext: Junio C Hamano
Message 5 of 35 in “Does Git really need a commit message to go with a commit?”
  1. Ævar Arnfjörð BjarmasonApr 3, 2010
  2. Avery PennarunApr 4, 2010
  3. Add option to git-commit to allow empty log messagesÆvar Arnfjörð Bjarmason, Apr 4, 2010
  4. David AguilarApr 4, 2010
  5. Ævar Arnfjörð BjarmasonApr 4, 2010
  6. Junio C HamanoApr 5, 2010
  7. Sverre RabbelierApr 5, 2010
  8. Junio C HamanoApr 5, 2010
  9. Sverre RabbelierApr 5, 2010
  10. Miles BaderApr 5, 2010
  11. Junio C HamanoApr 5, 2010
  12. Jeff KingApr 5, 2010
  13. Ævar Arnfjörð BjarmasonApr 5, 2010
  14. Jonathan NiederApr 5, 2010
  15. Jonathan NiederApr 5, 2010
  16. Jeff KingApr 6, 2010
  17. Add option to git-commit to allow empty log messagesÆvar Arnfjörð Bjarmason, Apr 6, 2010
  18. Junio C HamanoApr 7, 2010
  19. Ævar Arnfjörð BjarmasonApr 7, 2010
  20. Ævar Arnfjörð BjarmasonApr 6, 2010
  21. Remove --allow-empty from the git-commit synopsisÆvar Arnfjörð Bjarmason, Apr 7, 2010
  22. Sverre RabbelierApr 7, 2010
  23. Remove --allow-empty from the git-commit synopsisÆvar Arnfjörð Bjarmason, Apr 7, 2010
  24. Sverre RabbelierApr 7, 2010
  25. Ævar Arnfjörð BjarmasonApr 7, 2010
  26. Tay Ray ChuanApr 7, 2010
  27. Remove --allow-empty from the git-commit synopsisÆvar Arnfjörð Bjarmason, Apr 7, 2010
  28. Johannes SixtApr 7, 2010
  29. Junio C HamanoApr 7, 2010
  30. Remove --allow-empty from the git-commit synopsisÆvar Arnfjörð Bjarmason, Apr 7, 2010
  31. Stephen BoydApr 7, 2010
  32. Junio C HamanoApr 7, 2010
  33. Jeff KingApr 8, 2010
  34. Jeff KingApr 6, 2010
  35. Santi BéjarApr 4, 2010

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.