-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(branch): disallow branch before subcommand
The command line parsing for `stg branch` was such that specifying a branch name before a subcommand was being allowed, **but** that early branch name argument **was not** known or used by the subcommand; i.e. any branch name argument before the subcommand was silently ignored. This allowed certain valid command lines to lead to pathological behavior. For example: stg branch foo --delete --force would delete the current branch, not branch "foo". The fix is to enable clap's args_conflicts_with_subcommands for `stg branch`, which disallows non-subcommand arguments to precede a subcommand argument. This is consistent with the intended usage of `stg branch`. Fixes: #447
- Loading branch information
Showing
3 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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