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 Wed, Feb 3, 2010 at 4:31 AM, Jeff King <peff@xxxxxxxx> wrote:
> On Wed, Feb 03, 2010 at 01:15:35AM -0500, Larry D'Anna wrote:
>> * Avery Pennarun (apenwarr@xxxxxxxxx) [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.

Nice.

> 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
--
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]