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

Re: What's cooking in git.git (Dec 2023, #01; Sat, 9)

From
JHJeff Hostetler <git@jeffhostetler.com>
Date
Dec 14, 2023, 15:19 UTC
Message-ID
<e5295dbe-94d2-3186-5663-2466eba4bdde@jeffhostetler.com>
In-Reply-To
<xmqqa5qknnej.fsf@gitster.g>
On 12/8/23 9:02 PM, Junio C Hamano wrote:
> --------------------------------------------------
...
Show 14 quoted lines
> 
> * jc/diff-cached-fsmonitor-fix (2023-09-15) 3 commits
>   - diff-lib: fix check_removed() when fsmonitor is active
>   - Merge branch 'jc/fake-lstat' into jc/diff-cached-fsmonitor-fix
>   - Merge branch 'js/diff-cached-fsmonitor-fix' into jc/diff-cached-fsmonitor-fix
>   (this branch uses jc/fake-lstat.)
> 
>   The optimization based on fsmonitor in the "diff --cached"
>   codepath is resurrected with the "fake-lstat" introduced earlier.
> 
>   It is unknown if the optimization is worth resurrecting, but in case...
>   source: <xmqqr0n0h0tw.fsf@gitster.g>
> 
> --------------------------------------------------
...
Show 11 quoted lines
> * jc/fake-lstat (2023-09-15) 1 commit
>   - cache: add fake_lstat()
>   (this branch is used by jc/diff-cached-fsmonitor-fix.)
> 
>   A new helper to let us pretend that we called lstat() when we know
>   our cache_entry is up-to-date via fsmonitor.
> 
>   Needs review.
>   source: <xmqqcyykig1l.fsf@gitster.g>
> 
> 

I think these look good. And yes, it is better to insure that the stat struct is always well-defined rather than sometimes uninitialized.

FWIW, in f954c7b8ff3 (fsmonitor: never set CE_FSMONITOR_VALID on submodules, 2022-05-26) we try to never set the CE_FSMONITOR_VALID bit on submodules (because status on a submodule is much more than just an lstat check on the submodule root directory and we always should recursively ask Git to compute the submodule's status).

I haven't had time to investigate, but I wonder if the original complaint on `diff-lib` was due to another code path that allowed the CE_FSMONITOR_VALID bit to get set on a submodule entry.

Jeff
Previous: Jeff KingNext: Junio C Hamano
Message 3 of 4 in “What's cooking in git.git (Dec 2023, #01; Sat, 9)”
  1. Junio C HamanoDec 9, 2023
  2. Jeff KingDec 12, 2023
  3. Jeff HostetlerDec 14, 2023
  4. Junio C HamanoDec 14, 2023

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.