ok/jj
1
0
Fork 0
forked from mirrors/jj

cli: branch: remove inconsistent "pub"s from Args fields

This commit is contained in:
Yuya Nishihara 2024-06-20 12:57:39 +09:00
parent d640645d7b
commit 844e6684bd
7 changed files with 12 additions and 12 deletions

View file

@ -30,11 +30,11 @@ pub struct BranchDeleteArgs {
/// select branches by wildcard pattern. For details, see
/// https://github.com/martinvonz/jj/blob/main/docs/revsets.md#string-patterns.
#[arg(required_unless_present_any(&["glob"]), value_parser = StringPattern::parse)]
pub names: Vec<StringPattern>,
names: Vec<StringPattern>,
/// Deprecated. Please prefix the pattern with `glob:` instead.
#[arg(long, hide = true, value_parser = StringPattern::glob)]
pub glob: Vec<StringPattern>,
glob: Vec<StringPattern>,
}
pub fn cmd_branch_delete(

View file

@ -33,11 +33,11 @@ pub struct BranchForgetArgs {
/// select branches by wildcard pattern. For details, see
/// https://github.com/martinvonz/jj/blob/main/docs/revsets.md#string-patterns.
#[arg(required_unless_present_any(&["glob"]), value_parser = StringPattern::parse)]
pub names: Vec<StringPattern>,
names: Vec<StringPattern>,
/// Deprecated. Please prefix the pattern with `glob:` instead.
#[arg(long, hide = true, value_parser = StringPattern::glob)]
pub glob: Vec<StringPattern>,
glob: Vec<StringPattern>,
}
pub fn cmd_branch_forget(

View file

@ -55,7 +55,7 @@ pub struct BranchListArgs {
/// select branches by wildcard pattern. For details, see
/// https://github.com/martinvonz/jj/blob/main/docs/revsets.md#string-patterns.
#[arg(value_parser = StringPattern::parse)]
pub names: Vec<StringPattern>,
names: Vec<StringPattern>,
/// Show branches whose local targets are in the given revisions.
///

View file

@ -27,10 +27,10 @@ use crate::ui::Ui;
#[derive(clap::Args, Clone, Debug)]
pub struct BranchRenameArgs {
/// The old name of the branch.
pub old: String,
old: String,
/// The new name of the branch.
pub new: String,
new: String,
}
pub fn cmd_branch_rename(

View file

@ -25,15 +25,15 @@ use crate::ui::Ui;
pub struct BranchSetArgs {
/// The branch's target revision.
#[arg(long, short)]
pub revision: Option<RevisionArg>,
revision: Option<RevisionArg>,
/// Allow moving the branch backwards or sideways.
#[arg(long, short = 'B')]
pub allow_backwards: bool,
allow_backwards: bool,
/// The branches to update.
#[arg(required = true)]
pub names: Vec<String>,
names: Vec<String>,
}
pub fn cmd_branch_set(

View file

@ -35,7 +35,7 @@ pub struct BranchTrackArgs {
///
/// Examples: branch@remote, glob:main@*, glob:jjfan-*@upstream
#[arg(required = true, value_name = "BRANCH@REMOTE")]
pub names: Vec<RemoteBranchNamePattern>,
names: Vec<RemoteBranchNamePattern>,
}
pub fn cmd_branch_track(

View file

@ -33,7 +33,7 @@ pub struct BranchUntrackArgs {
///
/// Examples: branch@remote, glob:main@*, glob:jjfan-*@upstream
#[arg(required = true, value_name = "BRANCH@REMOTE")]
pub names: Vec<RemoteBranchNamePattern>,
names: Vec<RemoteBranchNamePattern>,
}
pub fn cmd_branch_untrack(