This repository was archived by the owner on Oct 9, 2026. It is now read-only.
Repository navigation
Let clap handle --, the debug subcommand and value names - #57
Merged
Merged
Conversation
Behavior change: a trailing `last = true` positional takes everything after `--`, replacing the argv surgery before parsing. - `diffr config -- foo` passes `foo` as the settings search; it was dropped. - `diffr config show -- x` is rejected; `x` was dropped. - Usage lines gain `[-- <paths>...]`. A scan for `--` remains: git reads an argument before a bare trailing `--` as a revision even when a file shares its name, and clap does not report an empty trailing group. AI assistance: Claude Code. Agent-Session: b28d94c6-2325-41ab-9fab-e9027acc5b09 Agent-Session: 01a0e9c2-2c41-7062-b484-92e030c4ab9c
Behavior change: main no longer checks argv[1] == "debug"; clap routes `debug` like `config`. So `diffr --stat debug ...` enters debug and ignores --stat, where it was "unknown revision or path". The next commit rejects that for both subcommands. DebugArgs derives Args and hangs off Command::Debug, hidden from --help, with the same version string and usage line as before. AI assistance: Claude Code. Agent-Session: b28d94c6-2325-41ab-9fab-e9027acc5b09 Agent-Session: 01a0e9c2-2c41-7062-b484-92e030c4ab9c
Behavior change: `diffr --cached config show` now fails with "the argument '--cached' cannot be used with the 'config' subcommand"; the flag was silently ignored. Likewise for `debug`. clap's args_conflicts_with_subcommands does not fit: once any top-level flag is given it reads the subcommand's name as a positional. Instead, check after parsing whether any top-level argument came from the command line, and raise clap's ArgumentConflict. AI assistance: Claude Code. Agent-Session: b28d94c6-2325-41ab-9fab-e9027acc5b09 Agent-Session: 01a0e9c2-2c41-7062-b484-92e030c4ab9c
Behavior change, help and errors only for the names: `<repo>` becomes `<REPO>`, `[items]...` becomes `[ITEMS]...` (or `<ITEMS>...` in conflict usage lines), and so on. `--repo` is a PathBuf, so a non-UTF-8 path is accepted instead of rejected. AI assistance: Claude Code. Agent-Session: b28d94c6-2325-41ab-9fab-e9027acc5b09 Agent-Session: 01a0e9c2-2c41-7062-b484-92e030c4ab9c
sidkmenon
added this pull request to stack #59
September 30, 2026 16:28
sidkmenon
marked this pull request as ready for review
September 30, 2026 17:11
Merged
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Stack created with GitHub Stacks CLI • Give Feedback 💬