Skip to content

Git - adopt the new package to use copy-on-write for the worktree include files#299583

Merged
lszomoru merged 4 commits intomainfrom
lszomoru/git-worktree-include-macos
Mar 10, 2026
Merged

Git - adopt the new package to use copy-on-write for the worktree include files#299583
lszomoru merged 4 commits intomainfrom
lszomoru/git-worktree-include-macos

Conversation

@lszomoru
Copy link
Member

@lszomoru lszomoru commented Mar 5, 2026

No description provided.

@lszomoru lszomoru requested review from Copilot and deepak1556 March 5, 2026 20:12
@lszomoru lszomoru self-assigned this Mar 5, 2026
@lszomoru lszomoru added this to the 1.112.0 milestone Mar 5, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-copyfile and 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

@lszomoru lszomoru marked this pull request as ready for review March 9, 2026 15:36
@lszomoru lszomoru merged commit 950ab07 into main Mar 10, 2026
18 of 19 checks passed
@lszomoru lszomoru deleted the lszomoru/git-worktree-include-macos branch March 10, 2026 10:52
lszomoru added a commit that referenced this pull request Mar 10, 2026
lszomoru added a commit that referenced this pull request Mar 10, 2026
lszomoru added a commit that referenced this pull request Mar 10, 2026
lszomoru added a commit that referenced this pull request Mar 11, 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants