worktree: Add worktree management commands and per-worktree trunks#1163
Open
ed-irl wants to merge 3 commits into
Open
worktree: Add worktree management commands and per-worktree trunks#1163ed-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. |
c8dd0d1 to
89378af
Compare
75c2b68 to
bed2fb1
Compare
This was referenced Jun 2, 2026
Draft
89378af to
0f8d65a
Compare
bed2fb1 to
55e79ed
Compare
0f8d65a to
e17e522
Compare
c1b7235 to
631867a
Compare
e17e522 to
47eb920
Compare
cc6ba9a to
a4057f6
Compare
47eb920 to
febcc09
Compare
fa75bd3 to
b8b5295
Compare
febcc09 to
8648c7a
Compare
b8b5295 to
6f87470
Compare
c8254f9 to
dabcd6f
Compare
dabcd6f to
1d76154
Compare
6f87470 to
f6588c8
Compare
1d76154 to
5e57d40
Compare
7170265 to
f86efce
Compare
Add `gs branch comment` subcommand group with six commands: - list: show inline comments and staged comments, with `--json` for NDJSON output - stage: stage an inline comment for batch submission - add: post an inline comment immediately - submit-staged: submit all staged comments as a review - resolve: resolve or unresolve a review thread - edit: edit a staged or forge comment Also adds DiffBranchBytes to git.Worktree for programmatic diff access needed by comment coordinate mapping.
5e57d40 to
b382179
Compare
f86efce to
112367a
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.
Adds a
gs worktreecommand family and per-worktree trunk support:worktree create <path>: creates a Git worktree that, by default, getsits own trunk branch (named after the directory, or
--trunk) trackingthe same remote trunk as the main checkout. Use
-bto also create atracked branch stacked on it, or
--no-trunkfor detached HEAD at trunk.worktree list(ls): lists worktrees with their checked-out branchand stack.
Per-worktree trunks are stored in a new, additive
worktree-trunksstatekey, so older repos and binaries are unaffected. They are treated as
trunk-equivalents: each tracks the same remote ref as the canonical
trunk and acts as a graph root, so sync and restack in different
worktrees never contend on a single shared trunk checkout.
repo syncnow pulls the remote canonical trunk into the worktree's local trunk.
Also adds worktree-aware filtering:
log short -w/--worktree: shows only stacks with a branch in thecurrent worktree.
repo restack -w/--worktree: restacks only those stacks.The branch graph and store gain
WorktreeTrunks/TrunkFor/IsTrunkhelpers and a
StacksInWorktreetraversal to back these.