feat(worktree): Add worktree commands, per-worktree trunks, and worktree-aware filtering#1183
Draft
ed-irl wants to merge 3 commits into
Draft
feat(worktree): Add worktree commands, per-worktree trunks, and worktree-aware filtering#1183ed-irl wants to merge 3 commits into
ed-irl wants to merge 3 commits into
Conversation
Collaborator
Author
|
This change is part of the following stack:
Change managed by git-spice. |
This was referenced May 19, 2026
Draft
8045352 to
1d40074
Compare
2fc4138 to
c978ecb
Compare
574e522 to
7cbf48b
Compare
c978ecb to
5659335
Compare
66cca89 to
39a8932
Compare
5659335 to
9750332
Compare
39a8932 to
2671243
Compare
9750332 to
4bde27c
Compare
2671243 to
763265d
Compare
4bde27c to
d52f52b
Compare
763265d to
fa376a3
Compare
d52f52b to
f41c960
Compare
fa376a3 to
df5a62e
Compare
f41c960 to
388d500
Compare
ed78147 to
ca8ae7b
Compare
82ec319 to
0f93a50
Compare
7246c35 to
4f82ef2
Compare
7192737 to
3ec5321
Compare
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.
Add 'gs worktree create' and 'gs worktree list'. By default 'worktree create' sets up a per-worktree trunk: a local branch tracking the same remote ref as the canonical trunk, so sync and restack in different worktrees never contend on a shared trunk checkout. --no-trunk preserves detached-HEAD behavior; -b stacks a tracked branch on the worktree trunk.
State gains a worktree-trunk registry (state/worktree.go) persisted under an additive, optional key. Store.IsTrunk now treats any registered worktree trunk as a graph root, and TrunkFor resolves the trunk for a given worktree. BranchGraph carries the full trunk set so traversals (Bottom, Downstack) stop at worktree trunks, and StacksInWorktree yields complete stacks touching a worktree.
Add '-w/--worktree' to 'log short' and 'repo restack' to scope output and restacking to the current worktree's stacks. Sync pulls the canonical remote trunk into the worktree's local trunk.