Skip to content

fix: --reuse + --base is a usage error - #62

Merged
sahil-noon merged 5 commits into
mainfrom
261123-udcv-reuse-base-usage-error
Nov 23, 2026
Merged

sahil-noon merged 5 commits into
mainfrom
261123-udcv-reuse-base-usage-error

Conversation

@sahil-noon

@sahil-noon sahil-noon commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Meta

Change ID Type Confidence Plan Review
udcv fix 4.8/5.0 5/5 tasks, 14/14 acceptance ✓ ✓ 1 cycle
Impact +/− Net
raw +617 / −66 +551
true +113 / −38 +75
└ impl +24 / −14 +10
└ tests +89 / −24 +65

excludes fab/, docs/ · generated by fab-kit v2.31.0

Pipeline: intake ✓ → apply ✓ → review ✓ → hydrate ✓ → ship

Summary

wt create --reuse --base <ref> used to let --reuse silently win: an existing worktree was reused on whatever base it had and --base was ignored (not even validated). The combination is now a usage error (exit 2) before any git work, mirroring the existing --checkout + --base conflict — plan fab/plans/sahil/26-11-23-worktree-base-receipts.md step W3.

Changes

  • New argument conflict in src/cmd/wt/create.go (--reuse and --base cannot be combined, exit 2, unconditional on name collision)
  • Drop the now-dead --reuse short-circuit on --base validation
  • --reuse + --fetch left to W1 (--fetch does not exist on main yet)
  • Help text names the conflict
  • Tests: old precedence tests replaced with conflict tests; new integration case
  • Docs: cli-surface.md, skill bundle (synced), README, docs/site/workflows.md

🤖 Generated with Claude Code

@sahil-noon
sahil-noon marked this pull request as ready for review November 23, 2026 16:09
@sahil-noon
sahil-noon merged commit 6a3b6aa into main Nov 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants