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

Re: [PATCH] Ensure that commit/status don't stat all files when core.ignoreStat = true

From
Marius Storm-Olsen <marius@trolltech.com>
Date
May 27, 2008, 20:21 UTC
Message-ID
<483C6D60.7090705@trolltech.com>
In-Reply-To
<7v7idf1pqy.fsf@gitster.siamese.dyndns.org>
Junio C Hamano said the following on 27.05.2008 22:00:
Show 6 quoted lines
> Marius Storm-Olsen <marius@trolltech.com> writes:
> The description for core.ignorestat in Documentation/config.txt is quite
> bogus.  That single bit does _not_ determine globally if we lstat(2) or
> not.  The description in Documentation/git-update-index.txt about it (look
> for the section "Using assume unchanged bit") accurately describes what it
> is meant to do.  The rules are:

Aha! Thanks for the detailed explanation of core.ignoreStat. Given your description, the patch is certainly bogus.

Show 11 quoted lines
> Would it be sufficient for what you are trying to do if you changed that
> test to something like this?
> 
>         /*
>          * CE_VALID means the user promised us that the change to
>          * the work tree does not matter and told us not to worry.
>          */
> 	if (!ignore_valid && (ce->ce_flags & CE_VALID)) {
>         	ce_mark_uptodate(ce);
> 		return ce;
> 	}

I'll give it a shot tomorrow, to see how it affects my use-cases. Thanks.

>> diff --git a/wt-status.c b/wt-status.c
>> index a44c543..72db466 100644
>> --- a/wt-status.c
>> +++ b/wt-status.c
...
Show 8 quoted lines
> The core.ignorestat variable does not have anything to do with showing
> untracked files.  It is about "do we mark the added path as CE_VALID,
> meaning that we do not have to lstat(2) them?"  IOW, it is about tracked
> files.
> 
> While it might be useful in certain workflows to ignore untracked files, I
> do not think it is a good idea to overload such an unrelated meaning to
> the variable.

Indeed. I'll resend a new patch tomorrow with a new variable which will only affect the stat'ing of untracked files, if you think that's reasonable. IMO, we certainly need a way of avoiding to stat the whole filetree on commits and status. I mean, that's what you have the -u option for, right? :-) In any case, an opt-in feature, of course.

Thanks for checking the patch!

-- .marius

Previous: Junio C HamanoNext: Marius Storm-Olsen
Message 3 of 11 in “Ensure that commit/status don't stat all files when core.ignoreStat = true”
  1. Ensure that commit/status don't stat all files when core.ignoreStat = trueMarius Storm-Olsen, May 27, 2008
  2. Junio C HamanoMay 27, 2008
  3. Marius Storm-OlsenMay 27, 2008
  4. 1/3 Clearify the documentation for core.ignoreStatMarius Storm-Olsen, May 30, 2008
  5. 2/3 Introduce core.showUntrackedFiles to make it possible to disable showing of untracked files.Simon Hausmann, May 30, 2008
  6. 3/3 Add shortcut in refresh_cache_ent() for marked entries.Marius Storm-Olsen, May 30, 2008
  7. Marius Storm-OlsenMay 30, 2008
  8. Marius Storm-OlsenMay 30, 2008
  9. Marius Storm-OlsenMay 30, 2008
  10. Junio C HamanoMay 30, 2008
  11. Marius Storm-OlsenMay 31, 2008

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.