mirror of
https://github.com/jj-vcs/jj.git
synced 2026-07-03 14:02:54 +08:00
cli: use default_value_t to accept typed values for CLI flags
This commit is contained in:
committed by
Austin Seipp
parent
c96e600fc0
commit
805a3134a7
@@ -104,7 +104,7 @@ pub(crate) struct BisectRunArgs {
|
||||
/// The interpretation of exit statuses will be inverted (excluding special
|
||||
/// exit statuses), so status 0 means bad and other non-zero statuses mean
|
||||
/// good.
|
||||
#[arg(long, value_name = "TARGET", default_value = "false")]
|
||||
#[arg(long, value_name = "TARGET", default_value_t = false)]
|
||||
find_good: bool,
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ use crate::ui::Ui;
|
||||
pub(crate) struct NextArgs {
|
||||
/// How many revisions to move forward. Advances to the next child by
|
||||
/// default
|
||||
#[arg(default_value = "1")]
|
||||
#[arg(default_value_t = 1)]
|
||||
offset: u64,
|
||||
|
||||
/// Instead of creating a new working-copy commit on top of the target
|
||||
|
||||
@@ -50,7 +50,7 @@ use crate::ui::Ui;
|
||||
#[command(verbatim_doc_comment)]
|
||||
pub(crate) struct PrevArgs {
|
||||
/// How many revisions to move backward. Moves to the parent by default
|
||||
#[arg(default_value = "1")]
|
||||
#[arg(default_value_t = 1)]
|
||||
offset: u64,
|
||||
|
||||
/// Edit the parent directly, instead of moving the working-copy commit
|
||||
|
||||
Reference in New Issue
Block a user