Optimize git status on mounts#26
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This speeds up
git statuson ArtifactFS mounts by letting Git avoid walking every clean tracked path through FUSE.git status --shorton large mounts was dominated by metadata lookups against clean tracked files. PR #22 improved hydration and indexing, but Git still refreshed the whole worktree through macFUSE.ReadDirPlusso directory listings can return child attributes without a per-entry lookup.fsmonitor.allowRemote=truefor managed gitdirs.ReadDirPlushydration, OpenDir generation consistency, and update-index pipe cleanup.Benchmark: local
file://repo with 20,000 tracked files, macFUSE mount, 3 timed runs after one warm-up.git status --short --untracked-files=allThe after run also verified
git ls-files -freported lowercasehfor tracked entries, confirming Git considered them fsmonitor-clean. Local Git 2.54 fsmonitor probing during review confirmed omitted dirty tracked paths can be missed, and returning the dirty path reports the modification.Verification:
Additional local validation during review:
git diff --checkgo build ./cmd/artifact-fsgo vet ./...go test ./...go test ./internal/gitstore ./internal/auth ./internal/logging ./internal/model ./internal/watcherThe opt-in FUSE e2e suite was attempted with
AFS_RUN_E2E_TESTS=1 go test -run TestE2E -v ., but this environment could not see/Library/Filesystems/macfuse.fs, so the FUSE cases skipped withmacFUSE not installed. E2E benchmark coverage still needs macFUSE or/dev/fuse.Relates to #24.