Follow-up to the worktree baseline/staleness work (PR #8, commit a37adf0). Reviewing wspace against git's own conventions surfaced three divergences worth tightening.
1. worktree add baseline default not surfaced in --help
src/cli.ts usage() (lines 48-64) does not state the start-point default.
- Behavior today:
wspace worktree add <feature> branches from origin/<default> (resolved via origin/HEAD), not the current HEAD.
- Deliberate and documented in
README.md + ADR-0003, but a git-familiar user reading wspace worktree add --help would assume git's HEAD baseline.
- Action: add one line to
usage() help text stating the default baseline (e.g. "start-point defaults to origin/<default>").
2. wspace check double-lists every repo as (unmanaged)
src/status.ts collectStatus() (lines 120-139): every git directory under repos/ is pushed with name (unmanaged) <name> regardless of manifest membership.
- The
managed set (line 120) is built but never used to exclude those entries; line 143 (if (!managed.has(repository.name)) continue;) is dead code because managed is derived from the same manifest being iterated.
- Result: each manifest repo appears twice in
wspace check output — once prefixed (unmanaged) (from the directory scan) and once as the managed row.
- Action: skip directories whose name is in
managed during the repos/ scan so (unmanaged) flags only truly unmanaged checkouts. Add/adjust unit coverage in tests/.
3. worktree list --stale uses harness vocabulary
--stale = branch fully merged into the default branch (or missing), i.e. a safe removal candidate. Git itself has no equivalent flag (git worktree list exposes --porcelain/--expire).
- Already documented in ADR-0003; the divergence is intentional but should be named where users look for git parity.
- Action: document
--stale semantics in wspace worktree list --help and the README command reference (no behavior change).
Verification
deno task ci (deno fmt --check, deno lint, deno check, deno test) green before merge.
Follow-up to the worktree baseline/staleness work (PR #8, commit
a37adf0). Reviewingwspaceagainst git's own conventions surfaced three divergences worth tightening.1.
worktree addbaseline default not surfaced in--helpsrc/cli.tsusage()(lines 48-64) does not state the start-point default.wspace worktree add <feature>branches fromorigin/<default>(resolved viaorigin/HEAD), not the currentHEAD.README.md+ ADR-0003, but a git-familiar user readingwspace worktree add --helpwould assume git'sHEADbaseline.usage()help text stating the default baseline (e.g. "start-point defaults toorigin/<default>").2.
wspace checkdouble-lists every repo as(unmanaged)src/status.tscollectStatus()(lines 120-139): every git directory underrepos/is pushed with name(unmanaged) <name>regardless of manifest membership.managedset (line 120) is built but never used to exclude those entries; line 143 (if (!managed.has(repository.name)) continue;) is dead code becausemanagedis derived from the same manifest being iterated.wspace checkoutput — once prefixed(unmanaged)(from the directory scan) and once as the managed row.managedduring therepos/scan so(unmanaged)flags only truly unmanaged checkouts. Add/adjust unit coverage intests/.3.
worktree list --staleuses harness vocabulary--stale= branch fully merged into the default branch (or missing), i.e. a safe removal candidate. Git itself has no equivalent flag (git worktree listexposes--porcelain/--expire).--stalesemantics inwspace worktree list --helpand the README command reference (no behavior change).Verification
deno task ci(deno fmt --check,deno lint,deno check,deno test) green before merge.