mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-18 18:27:38 +00:00
cli: don't allow multiple values for jj rebase
and jj untrack
Somehow I had thought that setting `clap(required = true)` on a list-type argument was not enough to convince clap to require at least one occurrence, but it seems that it does. The `min_values = 1` I had added to get it to work actually means that we accept multiple values passed to a single argument (e.g. `jj rebase -d x y z`), which is not what I had intended.
This commit is contained in:
parent
677dea1682
commit
c1e5f88780
1 changed files with 2 additions and 2 deletions
|
@ -1042,7 +1042,7 @@ struct CheckoutArgs {
|
|||
#[derive(clap::Args, Clone, Debug)]
|
||||
struct UntrackArgs {
|
||||
/// Paths to untrack
|
||||
#[clap(required = true, min_values = 1)]
|
||||
#[clap(required = true)]
|
||||
paths: Vec<String>,
|
||||
}
|
||||
|
||||
|
@ -1422,7 +1422,7 @@ struct RebaseArgs {
|
|||
#[clap(long, short)]
|
||||
source: Option<String>,
|
||||
/// The revision to rebase onto
|
||||
#[clap(long, short, required = true, min_values = 1)]
|
||||
#[clap(long, short, required = true)]
|
||||
destination: Vec<String>,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue