Repository navigation
Reflink dependencies into new worktrees - #207
Closed
aglowinthefield wants to merge 1 commit into
Closed
aglowinthefield wants to merge 1 commit into
aglowinthefield wants to merge 1 commit into
Conversation
A Worktrunk pre-start hook copies the main checkout's ignored files listed in .worktreeinclude into each new worktree. On APFS the copy is a reflink, so it uses no extra disk. The package manager then installs only what the branch's lockfile changed, instead of a full install per worktree. Run it after `git worktree add` with: wt -C <worktree> hook pre-start --foreground --yes
Author
|
Opened by mistake against upstream; sorry for the noise. |
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.
Adds a Worktrunk pre-start hook. It reflinks the main checkout's dependencies and build caches (listed in
.worktreeinclude) into each new worktree, then lets the package manager install only what the branch changed. On APFS the copy uses no extra disk.To run it after
git worktree add:wt -C <worktree> hook pre-start --foreground --yes. Tested by running the hook in this branch's own worktree: it exits 0 and leaves the lockfile unchanged.