Re: [BUG] - "git commit --amend" commits, when exiting the editor with no changes written
On Wed, Feb 3, 2010 at 4:31 AM, Jeff King <peff@peff.net> wrote:
Show 7 quoted lines
> On Wed, Feb 03, 2010 at 01:15:35AM -0500, Larry D'Anna wrote:
>> * Avery Pennarun (apenwarr@gmail.com) [100202 18:41]:
>> > You can however add *new* stuff. That's why I suggested adding an
>> > option. You could even make it a config option so you only have to
>> > set it once (just like setting your preferred editor).
>>
>> Or, he can set his $EDITOR to a script that checks the mtime.
> Do note, though, that there is a subtle race condition in using the
> mtime. If you make a change and save within a second of the editor
> starting, it will be ignored. To be thorough, you would probably want to
> check the size and inode, as well.
Or just the file contents.
Avery