You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Worktree tests miss the design's bare prunable case and two of its three mode-resolution cases #187
Parser tests … locked and prunable each with and without a reason …
Builder tests … One per option, plus three proving the mode field resolves to the last call rather than accumulating -b alongside --detach.
What exists today
GitIntegration.Test/Parsing/GitWorktreeParserTests.cs covers locked with and without a reason, but prunable only with a reason (ReadsAPrunableReason). GitWorktreeParser.cs (around L110-112) maps an empty value to null, but that path is untested for prunable.
GitIntegration.Test/Builders/GitWorktreeBuilderTests.cs has one mode test, TheLastModeSelectionWins (CreatingBranch → Detached), plus a commit-ish last-wins test.
Why it matters
The mode field is last-call-wins precisely so that -b <name> and --detach never reach git together (git rejects that combination). Only one direction of one pair is tested, so a regression that, say, leaves --detach behind when CreatingBranch is called second, or emits both -b and -B, would pass the suite.
Acceptance criteria
Parser: a bare prunable line yields IsPrunable == true and PrunableReason == null.
Builder: two more mode-resolution tests, e.g. Detached → CreatingBranch (no --detach in the vector) and CreatingBranch → CreatingOrResettingBranch (-B present, no -b), each asserting the earlier mode's flag and operand are absent.
Dependencies
None. #141 changes the same parser (-z / quoted reasons); either can land first.
Priority: Low. There is no known defect today. The issue closes gaps between the worktrees design spec and the tests in the suite.
Area / suggested assignment:GitWorktreeParserTests (add a bare prunable case) and GitWorktreeBuilderTests (add two more last-mode-wins cases). This is a good small first task.
Activity
matt-edmondson commentedon Oct 7, 2026
Triage
GitWorktreeParserTests(add a bareprunablecase) andGitWorktreeBuilderTests(add two more last-mode-wins cases). This is a good small first task.Generated by Claude Code