Граф коммитов

8 Коммитов

Автор SHA1 Сообщение Дата
Kevin Willford 6e8736a029 gvfs: refactor loading the core.gvfs config value
This code change makes sure that the config value for core_gvfs
is always loaded before checking it.

Signed-off-by: Kevin Willford <kewillf@microsoft.com>
2023-06-01 10:53:49 -07:00
Ben Peart b31415b99f gvfs: ensure all filters and EOL conversions are blocked
Ensure all filters and EOL conversions are blocked when running under
GVFS so that our projected file sizes will match the actual file size
when it is hydrated on the local machine.

Signed-off-by: Ben Peart <Ben.Peart@microsoft.com>
2023-06-01 10:53:49 -07:00
Kevin Willford e3cf5545e0 gvfs: optionally skip reachability checks/upload pack during fetch
While performing a fetch with a virtual file system we know that there
will be missing objects and we don't want to download them just because
of the reachability of the commits.  We also don't want to download a
pack file with commits, trees, and blobs since these will be downloaded
on demand.

This flag will skip the first connectivity check and by returning zero
will skip the upload pack. It will also skip the second connectivity
check but continue to update the branches to the latest commit ids.

Signed-off-by: Kevin Willford <kewillf@microsoft.com>
2023-06-01 10:53:49 -07:00
Kevin Willford 29bd7171e1 gvfs: prevent files to be deleted outside the sparse checkout
Prevent the sparse checkout to delete files that were marked with
skip-worktree bit and are not in the sparse-checkout file.

This is because everything with the skip-worktree bit turned on is being
virtualized and will be removed with the change of HEAD.

There was only one failing test when running with these changes that was
checking to make sure the worktree narrows on checkout which was
expected since we would no longer be narrowing the worktree.

Update 2022-04-05: temporarily set 'sparse.expectfilesoutsideofpatterns' in
test (until we start disabling the "remove present-despite-SKIP_WORKTREE"
behavior with 'core.virtualfilesystem' in a later commit).

Signed-off-by: Kevin Willford <kewillf@microsoft.com>
2023-06-01 10:53:49 -07:00
Kevin Willford 6f299dff2f gvfs: add the feature that blobs may be missing
Signed-off-by: Kevin Willford <kewillf@microsoft.com>
2023-06-01 10:53:49 -07:00
Kevin Willford 276f14289d gvfs: add the feature to skip writing the index' SHA-1
This takes a substantial amount of time, and if the user is reasonably
sure that the files' integrity is not compromised, that time can be saved.

Git no longer verifies the SHA-1 by default, anyway.

Signed-off-by: Kevin Willford <kewillf@microsoft.com>

Update for 2023-02-27: This feature was upstreamed as the index.skipHash
config option. This resulted in some changes to the struct and some of
the setup code. In particular, the config reading was moved to
prepare_repo_settings(), so the core.gvfs bit check was moved there,
too.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
2023-06-01 10:53:49 -07:00
Kevin Willford 8d57c9e44b gvfs: add the core.gvfs config setting
This does not do anything yet. The next patches will add various values
for that config setting that correspond to the various features
offered/required by GVFS.

Signed-off-by: Kevin Willford <kewillf@microsoft.com>
2023-06-01 10:53:48 -07:00
Kevin Willford 53cfcd99b9 gvfs: add a GVFS-specific header file
This header file will accumulate GVFS-specific definitions.

Signed-off-by: Kevin Willford <kewillf@microsoft.com>
2023-06-01 10:53:48 -07:00