Repository navigation
A checkout mid-rebase shows under the branch being rebased (#230) - #245
Merged
Merged
Conversation
git detaches HEAD while it rebases, so the worktree list named no branch and an agent working on main mid-rebase showed under no branch (#230). The rebase names its branch in head-name: WorktreeInfo carries it, with the operation in progress (worktree.operation.v1), and the TUI and Conch.app say rebasing on the branch's row. The same blindness let worktree.stale suggest removing a worktree mid-rebase and branch.prune offer the branch being rebased; neither does now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # internal/proto/proto.go
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.
Fixes #230.
A checkout in the middle of a rebase has HEAD detached by git until the rebase ends, so conch gave its panes no branch: an agent working on
mainmid-git pull --rebaseshowed under the project and no branch.What changes
gitx.Operationreads, with one call to git, what is left unfinished in a checkout and, for a rebase of a branch, which branch (rebase-mergeorrebase-apply'shead-name). A rebase of a detached HEAD (head-nameisdetached HEAD), a missing or emptyhead-name, and anamgive no branch.InProgressandRebasingBranchare now this.WorktreeInfo.Operation(capabilityworktree.operation.v1,omitempty): mid-rebase the worktree'sBranchis the branch being rebased, withDetachedstill true. So panes, branch lists (BranchInfo.Worktree), the git tab and anything matching by branch see it. A HEAD detached on purpose keeps no branch.rebasing(ormerging,cherry-picking…) before its conflict count; the project's worktree list saysmain · rebasing.worktree.stalecalled a linked worktree mid-rebase "detached" and suggested removing it (seen in the test on the old code), andbranch.prunedidn't count the branch being rebased as checked out. Now one mid-rebase is never suggested,worktree.cleanuprefuses it without-force, and prune refuses its branch.conch worktree lssaysrebasing.Tests
-i,--apply) in a linked worktree, the main checkout, a rebased detached HEAD,head-nameempty and missing,am, not a repository.main, the worktree carriesoperationand the conflict, back after--abort, none on a plain detached HEAD; cleanup and prune leave a rebase alone. Both fail on the old code.branchBadges, decoding with and without the field).make gateandswift testgreen.Not done: resolving or continuing the rebase from conch (out of scope).
🤖 Generated with Claude Code