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

Git Feature Request (Commit Message editing directly from interactive rebase control file)

From
Mike McLean <stixmclean@googlemail.com>
Date
Dec 23, 2020, 23:07 UTC
Message-ID
<CAM0jFOfvNFva98PNjO33HW3Y4+L1SufvEHQYzwGLHgOkfhmUDQ@mail.gmail.com>
In-Reply-To
<CAM0jFOfx+vxvUAqZqnxeOvGmn0F0Q6vyTKWPjtsSh1bmq__SsQ@mail.gmail.com>

I initially raised this as a FR with my git UI of choice, and was told that it was actually something that git itself would need to do ... and that the standard way to raise Feature Requests was to email this list.

Apologies if that's not actually what I should be doing - please let me know if this is not an intended use.

=-=-=-=-=-=-=-=-=-= When you do an interactive rebase, you are presented with a file listing all the commit hashes, their current message, and the command/operation to perform.

To edit the commit message you set operation `r` and then are later given the opportunity to set the message. But that control file is only using the commit hashes to determine which commit is being referenced - the message text in that file isn't being used to identify the message.

So can we allow the user to (optionally) set the new message directly in that file?

It would make the flow a lot quicker (don't have to open a new editor instance each time.), and would make it a lot easier to make similar changes to a bunch of commits (e.g. prefixing them all with Ticket number, or fixing a consistent typo in a bunch of commits.)

Indicator that the commit-rename should use the text in the control file (rather than the later editor prompt) could either be A) a new command (rename-inline, or similar) or B) existing rename command + "the text on this line is different from the text on the original commit".

Obviously this wouldn't support multiline commit messages - those would still use the existing workflow, but adding this new feature wouldn't impinge upon them, so they've not lost anything.

Am happy to suggest names and/or shorthand keys for it, if the idea is acceptable.

Yours, Brondahl

Next: Junio C Hamano
Message 1 of 5 in “Git Feature Request (Commit Message editing directly from interactive rebase control file)”
  1. Mike McLeanDec 23, 2020
  2. Junio C HamanoDec 23, 2020
  3. brian m. carlsonDec 24, 2020
  4. Mike McLeanDec 24, 2020
  5. Theodore Y. Ts'oDec 24, 2020

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.