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
refactor(cli): consolidate --no-verify deprecation into one path (#2868)
The deprecated `--no-verify` flag was declared as a clap arg five times
— across `SwitchArgs`, `RemoveArgs`, `CommitArgs`, `SquashArgs`, and
`MergeArgs` — under two field names, resolved through two helpers, with
the deprecation-warning string hand-duplicated in two places.
This collapses the four bool-resolving commands (`switch`, `remove`,
`step commit`, `step squash`) onto a single flattened `HookFlags` args
struct with one `resolve()` method, and routes every `--no-verify`
deprecation warning — merge's included — through one emitter, so the
warning text exists in exactly one place.
`wt merge` keeps its own flags: its hooks flag is genuinely tri-state
(`Option<bool>`, so config `[merge] verify` still applies) with a
positive `--verify` override, which `HookFlags`'s
`SetFalse`/default-true shape cannot express. It shares only the warning
emitter — forcing it into the struct would need a special case.
Behavior is unchanged: `--no-verify` still works as a deprecated alias
and emits the same warning under the same conditions. One visible
`--help` change, a direct consequence of the shared struct: `--no-hooks`
for `step commit`/`step squash` moves under the `Automation` heading,
matching where `switch`/`remove`/`merge` already place it. Doc mirrors
regenerated.
> _This was written by Claude Code on behalf of Maximilian Roos_
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments