feat: add worktree management commands, per-worktree trunks, and worktree-aware filtering#1164
Open
ed-irl wants to merge 1 commit into
Open
feat: add worktree management commands, per-worktree trunks, and worktree-aware filtering#1164ed-irl wants to merge 1 commit into
ed-irl wants to merge 1 commit into
Conversation
Collaborator
Author
|
This change is part of the following stack:
Change managed by git-spice. |
75c2b68 to
bed2fb1
Compare
47a7eed to
d42cd46
Compare
This was referenced Jun 2, 2026
Draft
bed2fb1 to
55e79ed
Compare
e683e4f to
bc2d528
Compare
c1b7235 to
631867a
Compare
cc6ba9a to
a4057f6
Compare
d270ec2 to
0a8ca42
Compare
fa75bd3 to
b8b5295
Compare
0a8ca42 to
03fafd4
Compare
b8b5295 to
6f87470
Compare
03fafd4 to
1f477e3
Compare
6f87470 to
f6588c8
Compare
1f477e3 to
7241e23
Compare
7170265 to
f86efce
Compare
f84f05d to
c2cb662
Compare
Add test scripts covering the core comment workflows: - stage and submit staged comments as a review - add an inline comment immediately - list comments (text and `--json` output) - resolve a review thread - edit a staged comment Also fixes a nil pointer dereference when no staged comments exist for a branch, and includes thread IDs in list output for use with resolve/unresolve commands.
f86efce to
112367a
Compare
c2cb662 to
63cfc0c
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 group and the per-worktree trunk machinery that lets stacks in different worktrees sync and restack without contending on a single shared trunk checkout.Commands
gs worktree create <path>(aliaswtc): creates a worktree with its own local trunk branch that tracks the same remote ref as the canonical trunk. The trunk is named after the worktree directory or set with--trunk.-b/--branchalso creates a tracked branch stacked on the worktree trunk;--no-trunkkeeps the legacy detached-HEAD behavior.gs worktree list(aliaswtls): lists worktrees with their checked-out branch and stack.Worktree-aware filtering
gs log short/log longgain-w/--worktreeto show only stacks with a branch checked out in the current worktree (implies--all).gs repo restackgains-w/--worktreeto restack only those stacks. The restack handler grows aWorktreeFilterand aSkipCheckoutoption.State and graph
worktree.go): persisted under an additive, optionalworktree-trunkskey so older binaries and pre-feature repos are unaffected. AddsRegisterWorktreeTrunk/UnregisterWorktreeTrunk,TrunkFor,WorktreeTrunks, and anIsTrunkcheck used by the branch transaction.BranchGraphtreats every registered worktree trunk as a graph root, so downstack and bottom traversals stop there.BranchGraph.StacksInWorktreereturns the full stacks touching a given worktree, backing both filters.git.Repository.WorktreeAddwrapsgit worktree add;spice.GitWorktreeexposesRootDir.Sync resolves the local trunk to pull into via
TrunkForwhile still fetching from the canonical remote ref, so a linked worktree updates its own trunk.