Re: Fix extraneous lstat's in 'git checkout -f'
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Jul 14, 2009, 14:50 UTC
- Message-ID
- <alpine.LFD.2.01.0907140750290.13838@localhost.localdomain>
- In-Reply-To
- <7vzlb7hc7y.fsf@alter.siamese.dyndns.org>
On Tue, 14 Jul 2009, Junio C Hamano wrote:
Show 8 quoted lines
> Linus Torvalds <torvalds@linux-foundation.org> writes: > > > Quite frankly, I'd like for us to at least think about removing CE_VALID. > > This is heavy. I personally do not use this flag, nor know anybody who > does, but deviating from the original purpose of CE_VALID, which was to > avoid lstat() on slow filesystems, people have advised/advocated its use > for "narrow checkout".
Ahh. I kind of was aware of that, but had totally forgotten.
And in that case, I guess it's also fine. In fact, for that case CE_VALID would tend to really mean "always assume CE_UPTODATE", so then the patch I sent out doesn't really necessarily need the whole "known_uptodate()" thing, and could just use
if (o->reset && !ce_valid(old)) {instead.
Which also makes my other worries go away.
Linus