Skip to content

docs(step): correct squash --stage=none and prune skip-list help - #4268

Merged
max-sixty merged 1 commit into
mainfrom
nightly/clean-36103942419-step-help
Sep 25, 2026
Merged

max-sixty merged 1 commit into
mainfrom
nightly/clean-36103942419-step-help

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

Two statements in wt step help were wrong about behavior, and the generated docs pages repeat them. This PR corrects both in src/cli/step.rs and regenerates the synced pages.

  • wt step squash --stage=none. The help said this squashes "only committed changes". In fact changes already in the index are folded in too: has_staged drives the squash path in squash.rs. --stage=none only skips staging new changes. The help now says "squash commits plus what's already staged", which matches the wt step commit row above it.
  • wt step prune. The help said locked worktrees and the main worktree are always skipped. A worktree with uncommitted changes (untracked files included) is skipped as well. It gets no removal plan and is filtered without a message, as the CheckOutcome::plan doc in prune.rs says. The skip list now includes it.

Verification: I built wt and ran it in a scratch repo. wt step squash --stage=none over two empty commits plus a staged s.txt produced one commit containing s.txt. wt step prune --min-age=0s --dry-run, run with one integrated clean worktree and one integrated worktree holding an untracked file, listed only the clean one. test_docs_are_in_sync and the help snapshot tests pass. No regression test is added because this changes only documentation.

…ips dirty worktrees

wt step squash --stage=none folds already-staged changes into the squash
commit, not only committed changes. wt step prune silently skips worktrees
with uncommitted changes (the removal plan is None for them), which the
skip list left out.
@worktrunk-bot worktrunk-bot added the nightly-cleanup Issues found by nightly code quality sweep label Sep 25, 2026
@max-sixty
max-sixty enabled auto-merge (squash) September 25, 2026 07:04
@max-sixty
max-sixty merged commit 8e4f853 into main Sep 25, 2026
37 of 47 checks passed
@max-sixty
max-sixty deleted the nightly/clean-36103942419-step-help branch September 25, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nightly-cleanup Issues found by nightly code quality sweep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants