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

Re: [PATCH] sequencer: make it clearer that commit descriptions are just comments

From
Junio C Hamano <gitster@pobox.com>
Date
May 15, 2025, 13:58 UTC
Message-ID
<xmqqzffe2cyd.fsf@gitster.g>
In-Reply-To
<pull.1923.git.1747275627422.gitgitgadget@gmail.com>
"Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 9 quoted lines
> suggesting that users are (a) only using one-line commit messages, and
> (b) not understanding that the commit summaries are merely helpful
> comments to help them find the right hashes.
>
> It may be difficult to correct users' poor commit messages, but we can
> at least try to make it clearer that the commit summaries are not
> directives of some sort by inserting a comment character.  Hopefully
> that leads to them looking a little further and noticing the hints at
> the bottom to use 'reword' or 'edit' directives.
Cute and clever.
Show 9 quoted lines
>  Last commands done (2 commands done):
> -   pick $COMMIT2 two_split
> -   edit $COMMIT3 three_split
> +   pick $COMMIT2 # two_split
> +   edit $COMMIT3 # three_split
>  Next command to do (1 remaining command):
> -   pick $COMMIT4 four_split
> +   pick $COMMIT4 # four_split
>    (use "git rebase --edit-todo" to view and edit)

These show the intentions quite well. I think all places the addition of '#' is done at the output layer, and the matching of commits for the purpose of --autosquash should be done solely using the internal representation without '#', this change should not break anything, I would think, that we internally have.

Breaking custom todo-editors the users may have is a different story, but if they are somehow matching against the first line of the commit log message when there prominently is a short-but-unique commit object name, they are simply crazy and not worth worrying about, I would say ;-)

Previous: Junio C HamanoNext: Elijah Newren via GitGitGadget
Message 10 of 11 in “sequencer: make it clearer that commit descriptions are just comments”
  1. sequencer: make it clearer that commit descriptions are just commentsElijah Newren via GitGitGadget, May 15, 2025
  2. RetoMay 15, 2025
  3. Phillip WoodMay 15, 2025
  4. Phillip WoodMay 15, 2025
  5. Phillip WoodMay 15, 2025
  6. Junio C HamanoMay 15, 2025
  7. Ben KnobleMay 16, 2025
  8. Elijah NewrenMay 16, 2025
  9. Junio C HamanoMay 16, 2025
  10. Junio C HamanoMay 15, 2025
  11. sequencer: make it clearer that commit descriptions are just commentsElijah Newren via GitGitGadget, May 16, 2025

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.