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

Re: bug/defaults: COMMIT_EDITMSG not reused after a failed commit

From
Robert Coup <robert.coup@koordinates.com>
Date
Jul 25, 2024, 08:15 UTC
Message-ID
<CAFLLRpKqU7nBGsPsf=kdA9Z4F6QaZ91hsRvArRy0GaCfxUgsTg@mail.gmail.com>
In-Reply-To
<xmqq1q3iyceq.fsf@gitster.g>
Hi Junio,
On Wed, 24 Jul 2024 at 17:37, Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted lines
>
> Unconditionally doing this change would be disruptive to workflows
> of existing users.  To them, Git left COMMIT_EDITMSG available even
> after the commit to them almost forever, but suddenly it stops doing
> so.

A general question: how far down the "I can imagine a hypothetical workflow" route do we need to go? Moreso when the behaviour is documented as doing something different, and it's noted in the list archive as a bug? I appreciate there's a lot of users out there who do a lot of weird and wonderful things. Could it suffice for the hypothetical user to have an opt-in way to get to the old behaviour?

Some experimenting reveals a simple `git commit -F .git/COMMIT_EDITMSG` doesn't work, since the comments get committed; and using `git commit --template .git/COMMIT_EDITMSG` repeats the #boilerplate, and results in an "Aborting commit; you did not edit the message." error, even when you do. `git commit --edit -F .git/COMMIT_EDITMSG --cleanup=strip` works, except it also repeats the #boilerplate again, and it's getting unwieldy. I'll explore Jeff's patch too.

Thanks,
Rob :)
Previous: Junio C Hamano
Message 6 of 6 in “bug/defaults: COMMIT_EDITMSG not reused after a failed commit”
  1. Robert CoupJul 24, 2024
  2. Junio C HamanoJul 24, 2024
  3. Konstantin RyabitsevJul 24, 2024
  4. Jeff KingJul 24, 2024
  5. Junio C HamanoJul 25, 2024
  6. Robert CoupJul 25, 2024

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.