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 :)