Re: [PATCH] Teach "git add" and friends to be paranoid
- From
- Peter Harris <git@peter.is-a-geek.org>
- Date
- Feb 18, 2010, 20:14 UTC
- Message-ID
- <eaa105841002181214g380754fl9f7763ace4b2b457@mail.gmail.com>
- In-Reply-To
- <alpine.LFD.2.00.1002181456230.1946@xanadu.home>
On Thu, Feb 18, 2010 at 2:58 PM, Nicolas Pitre wrote:
> > Can't we rely on the mtime of the source file? Sample it before > starting hashing it, then make sure it didn't change when done.
Some filesystems (eg FAT) have an abysmal mtime granularity (2 seconds). The same race exists on other filesystems, albeit with a much narrower window of opportunity.
Peter Harris