Repository navigation
docs(step): correct squash --stage=none and prune skip-list help - #4268
Merged
Merged
Conversation
…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.
max-sixty
enabled auto-merge (squash)
September 25, 2026 07:04
1 task
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.
Two statements in
wt stephelp were wrong about behavior, and the generated docs pages repeat them. This PR corrects both insrc/cli/step.rsand 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_stageddrives the squash path insquash.rs.--stage=noneonly skips staging new changes. The help now says "squash commits plus what's already staged", which matches thewt step commitrow 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 theCheckOutcome::plandoc inprune.rssays. The skip list now includes it.Verification: I built
wtand ran it in a scratch repo.wt step squash --stage=noneover two empty commits plus a stageds.txtproduced one commit containings.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_syncand the help snapshot tests pass. No regression test is added because this changes only documentation.