Re: [PATCH v1 2/2] entry.c: check if file exists after checkout
- From
Jeff King <peff@peff.net>
- Date
- Oct 6, 2017, 06:05 UTC
- Message-ID
- <20171006060542.llx4golnkuxksy7z@sigill.intra.peff.net>
- In-Reply-To
- <xmqqd160x16i.fsf@gitster.mtv.corp.google.com>
On Fri, Oct 06, 2017 at 03:03:49PM +0900, Junio C Hamano wrote:
Show 7 quoted lines
> Jeff King <peff@peff.net> writes: > > > I don't know if we wanted to capture any of the reasoning behind using > > error() here or not. Frankly, I'm not sure how to argue for it > > succinctly. :) I'm happy with letting it live on in the list archive. > > Are you talking about the "philosophical" thing?
Right, whether we ought to just mark the entry as stat-dirty and return success.
Show 7 quoted lines
> Because we cannot quite tell between the two cases (one is error--we > wrote or we thought we wrote, but we cannot find it, the other is > dubious--somebody was racing with us in the filesystem), I think it > is reasonable to err on the safer side, even though an error abort > while doing "as we know we wrote the thing that match the index, we > might as well lstat and mark the cache entry as up-to-date" might be > a bit irritating.
OK. I can live with that line of thought.
-Peff