Skip to content

fix: subcommand routing drops unrecognized subcommands (#600)#601

Open
pszymkowiak wants to merge 1 commit intodevelopfrom
fix/subcommand-routing-600
Open

fix: subcommand routing drops unrecognized subcommands (#600)#601
pszymkowiak wants to merge 1 commit intodevelopfrom
fix/subcommand-routing-600

Conversation

@pszymkowiak
Copy link
Collaborator

Summary

Fixes three command modules that silently drop or misroute unrecognized subcommands:

  • git stash: save, branch, clear, store fell into default _ => which ran git stash (push) without the subcommand — now passes through correctly
  • git branch: --show-current, --set-upstream-to, --format, --sort, --points-at were not detected — --show-current returned a branch list instead of the current branch name
  • pip: bail!() on unknown subcommands (freeze, download, wheel) — now falls through to passthrough

Test plan

  • cargo fmt --all --check — clean
  • cargo test --all — 920 passed
  • rtk git stash clearok stash clear (was: ok (nothing to stash))
  • rtk git branch --show-currentfix/subcommand-routing-600 (was: full branch list)
  • rtk pip freeze → pip output (was: unsupported subcommand 'freeze')
  • /rtk-check full health check — 37/41 Rust, 15/15 TOML, 18/20 rewrite (all failures preexisting)

Fixes #600

- git stash: pass unknown subcommands (save, branch, clear) through
  instead of silently falling back to git stash push
- git branch: add --show-current, --set-upstream-to, --format, --sort
  to flag detection so they don't get overridden by -a injection
- pip: replace bail!() with passthrough for unknown subcommands
  (freeze, download, wheel, etc.)

Fixes #600

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant