git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C HamanoNext: Linus Torvalds
Message 4 of 5 in “Fix extraneous lstat's in 'git checkout -f'”
  1. Linus TorvaldsJul 14, 2009
  2. Linus TorvaldsJul 14, 2009
  3. Junio C HamanoJul 14, 2009
  4. Linus TorvaldsJul 14, 2009
  5. Fix extraneous lstat's in 'git checkout -f'Linus Torvalds, Jul 14, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.