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

Re: [BUG] - "git commit --amend" commits, when exiting the editor with no changes written

From
ESEugene Sajine <euguess@gmail.com>
Date
Feb 3, 2010, 00:55 UTC
Message-ID
<76c5b8581002021655k5f63b81h1c55ae87625fbfc5@mail.gmail.com>
In-Reply-To
<40aa078e1002021616s3098bf53la6af93ab0949e7e@mail.gmail.com>
On Tue, Feb 2, 2010 at 7:16 PM, Erik Faye-Lund <kusmabite@googlemail.com> wrote:
Show 32 quoted lines
> On Wed, Feb 3, 2010 at 12:48 AM, Eugene Sajine <euguess@gmail.com> wrote:
>>>
>>> This is where you're wrong. The reason why commit (without --amend) is
>>> aborting when you don't save is that the default commit message is
>>> empty, not that it wasn't saved. In fact, just saving still makes in
>>> abort. You need to add something to the commit message and then save
>>> to get it to perform the commit.
>>>
>>>> Same should be applied to rebase -i and of course to commit --amend as
>>>> it is still commit operation.
>>>>
>>>
>>> "rebase -i" and "commit --amend" already has the exact same logic as
>>> commit without ammend in this regard - they abort if the buffer is
>>> empty.
>>>
>>> --
>>> Erik "kusma" Faye-Lund
>>>
>>
>> Thank you, but I'm not wrong, as i described the exact same thing
>> somewhere in my second or third message, without even knowing the
>> implementation details. I understand the reason WHY it is like it is,
>> i just don't like it as it is inconsistent and IMHO incorrect.
>>
>
> But you are. The interface isn't inconsistent. Your model of how it
> works however, is wrong.
>
> --
> Erik "kusma" Faye-Lund
>

I'm sorry, but I don't get in which part my model is so wrong? The only difference i see between your and my explanation is that you mentioned the fact that simply saving the pregenerated new commit message is not working because there is no meaningful (uncommented) string inserted into the template. But this doesn't change the problem it self, so I don't think it is relevant.

What is relevant though is that in current workflow with "rebase -i" you have to remove! all commits listed for rebase and save! the file in order to cancel! rebase operation. This is very strange user interaction model IMHO

Instead of being explicit in applying the changes, we are explicit in cancelling the operation. Very strange...

Thanks, Eugene

Previous: Erik Faye-LundNext: SZEDER Gábor
Message 24 of 45 in “[BUG] - "git commit --amend" commits, when exiting the editor with no changes written”
  1. Eugene SajineFeb 2, 2010
  2. Jacob HelwigFeb 2, 2010
  3. Avery PennarunFeb 2, 2010
  4. Eugene SajineFeb 2, 2010
  5. Wincent ColaiutaFeb 2, 2010
  6. Eugene SajineFeb 2, 2010
  7. Erik Faye-LundFeb 2, 2010
  8. Wincent ColaiutaFeb 2, 2010
  9. Eugene SajineFeb 2, 2010
  10. Avery PennarunFeb 2, 2010
  11. Eugene SajineFeb 2, 2010
  12. Johannes SchindelinFeb 2, 2010
  13. Eugene SajineFeb 2, 2010
  14. Avery PennarunFeb 2, 2010
  15. Larry D'AnnaFeb 3, 2010
  16. Jeff KingFeb 3, 2010
  17. Jeff KingFeb 3, 2010
  18. Avery PennarunFeb 3, 2010
  19. Johannes SchindelinFeb 2, 2010
  20. Eugene SajineFeb 2, 2010
  21. Erik Faye-LundFeb 2, 2010
  22. Eugene SajineFeb 2, 2010
  23. Erik Faye-LundFeb 3, 2010
  24. Eugene SajineFeb 3, 2010
  25. SZEDER GáborFeb 3, 2010
  26. Matthieu MoyFeb 3, 2010
  27. aborting rebase -i right at the start, was Re: [BUG] - "git commit --amend" commits, when exiting the editor with no changes writtenJohannes Schindelin, Feb 3, 2010
  28. SZEDER GáborFeb 3, 2010
  29. Eugene SajineFeb 3, 2010
  30. Matthieu MoyFeb 3, 2010
  31. Eugene SajineFeb 3, 2010
  32. Jonathan NiederFeb 3, 2010
  33. Jonathan NiederFeb 3, 2010
  34. Wincent ColaiutaFeb 3, 2010
  35. Eugene SajineFeb 3, 2010
  36. Avery PennarunFeb 3, 2010
  37. Eugene SajineFeb 3, 2010
  38. Avery PennarunFeb 3, 2010
  39. Matthieu MoyFeb 3, 2010
  40. Johannes SchindelinFeb 2, 2010
  41. Eugene SajineFeb 3, 2010
  42. Johannes SchindelinFeb 3, 2010
  43. Paolo BonziniFeb 3, 2010
  44. Junio C HamanoFeb 2, 2010
  45. Avery PennarunFeb 2, 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.