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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/03/2010 01:09 AM, Eugene Sajine wrote:
Sorry, your "if message was not saved, abort" is so out of line with any
program I use that this would be highly confusing (maybe "complicated" was
the wrong choice of words).

Frankly, i think it is in line with "git commit"

The fundamental problem is this. The behavior of "git commit" can be explained in two ways: a) abort if not saved; b) abort if empty. (a) may be an easier guess from experience (you type ":q!" at the vi prompt), but (b) is clear from the error message ("commit has empty message--aborting"). All this is irrefutable.

Now, the scientific method to see which one is correct, would be to try other commands including "git commit --amend" and see which of the two hypotheses was right. It turns out to be that (b) is correct and consistent across various commands; instead you insist that everything else should be modified to conform to (a). Since git is already consistent, and since nobody can think of a way to implement your proposal, there is obvious resistence to any change in this area.

Paolo

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]