Re: [BUG] - "git commit --amend" commits, when exiting the editor with no changes written
- From
Erik Faye-Lund <kusmabite@googlemail.com>
- Date
- Feb 3, 2010, 00:16 UTC
- Message-ID
- <40aa078e1002021616s3098bf53la6af93ab0949e7e@mail.gmail.com>
- In-Reply-To
- <76c5b8581002021548n129b3997r48ee6f6df5a1a4eb@mail.gmail.com>
On Wed, Feb 3, 2010 at 12:48 AM, Eugene Sajine <euguess@gmail.com> wrote:
Show 24 quoted lines
>> >> 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