Subject: Re: [PATCH v4] repo_read_index: add config to expect files outside sparse patterns

From: Derrick Stolee <[email-masked]>
Date: Wed, 2 Mar 2022 08:37:12 -0500

On 2/26/2022 1:12 AM, Elijah Newren wrote:
> Introduce a configuration setting sparse.expectFilesOutsideOfPatterns to
> allow limiting the tracked set of files to a small set once again.  A
> Git-aware virtual file system or other application that wants to
> maintain files outside of the sparse checkout can set this in a
> repository to instruct Git not to check for the presence of
> SKIP_WORKTREE files.  The setting defaults to false, so most users of
> sparse checkout will still get the benefit of an automatically updating
> index to recover from the variety of difficult issues detailed in
> af6a51875a for paths with SKIP_WORKTREE set despite the path being
> present.

Sorry that I lost track of this thread recently. I re-read this
version that made it to 'next' already and have no issues.

This approach will work well for our needs in the microsoft/git
fork. Likely, we'll enable the sparse_expect_files_outside_of_patterns
global when we initialize our core_virtualfilesystem global.
Then, we'll probably replace some of the uses of core_virtualfilesytem
with this new global in some of the conditions that we inserted to
work with previous restrictions in this area. Then, those changes will
be fit for submitting here. If anyone needs those changes sooner, then
do not hesitate to make similar changes. We will adapt in our fork to
whatever the Git community thinks is best.

Thanks,
-Stolee