Git - adopt the new package to use copy-on-write for the worktree include files#299583
Merged
Git - adopt the new package to use copy-on-write for the worktree include files#299583
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Git extension’s worktree-include-file copying logic to leverage an optional native copy-on-write implementation (especially on macOS), while also attempting to reduce the amount of filesystem traversal/copy work needed.
Changes:
- Add optional dependency on
@vscode/fs-copyfileand attempt to use it on macOS for copy-on-write copies. - Optimize path handling by computing glob “base” directories and selecting a “topmost paths” set to copy.
- Adjust the directory-walk logic for building the set of parent directories to include.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| extensions/git/src/repository.ts | Adds macOS-native copy-on-write copy path and refactors how include/ignored paths are expanded and copied. |
| extensions/git/package.json | Adds @vscode/fs-copyfile as an optional dependency for the extension. |
Files not reviewed (1)
- extensions/git/package-lock.json: Language not supported
deepak1556
approved these changes
Mar 10, 2026
lszomoru
added a commit
that referenced
this pull request
Mar 16, 2026
) * Reapply "Git - adopt the new package to use copy-on-write for the worktree include files (#299583)" (#300448) This reverts commit c56c7bc. * Attempt to fix tests * Fix build * build: copy node_modules into extension bundle * Regenerate lock file --------- Co-authored-by: deepak1556 <hop2deep@gmail.com>
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.
No description provided.