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

cli: branch: remove trailing period from command/arg summary lines

That's the convention of clap.
This commit is contained in:
Yuya Nishihara 2024-06-20 13:01:55 +09:00
parent 844e6684bd
commit d4e64c46b4
8 changed files with 22 additions and 23 deletions

View file

@ -21,14 +21,14 @@ use crate::cli_util::{CommandHelper, RevisionArg};
use crate::command_error::{user_error_with_hint, CommandError};
use crate::ui::Ui;
/// Create a new branch.
/// Create a new branch
#[derive(clap::Args, Clone, Debug)]
pub struct BranchCreateArgs {
/// The branch's target revision.
/// The branch's target revision
#[arg(long, short)]
revision: Option<RevisionArg>,
/// The branches to create.
/// The branches to create
#[arg(required = true, value_parser=NonEmptyStringValueParser::new())]
names: Vec<String>,
}

View file

@ -21,7 +21,7 @@ use crate::command_error::CommandError;
use crate::ui::Ui;
/// Delete an existing branch and propagate the deletion to remotes on the
/// next push.
/// next push
#[derive(clap::Args, Clone, Debug)]
pub struct BranchDeleteArgs {
/// The branches to delete

View file

@ -21,7 +21,7 @@ use crate::command_error::CommandError;
use crate::ui::Ui;
/// Forget everything about a branch, including its local and remote
/// targets.
/// targets
///
/// A forgotten branch will not impact remotes on future pushes. It will be
/// recreated on future pulls if it still exists in the remote.

View file

@ -36,16 +36,16 @@ use crate::ui::Ui;
#[derive(clap::Args, Clone, Debug)]
pub struct BranchListArgs {
/// Show all tracking and non-tracking remote branches including the ones
/// whose targets are synchronized with the local branches.
/// whose targets are synchronized with the local branches
#[arg(long, short, alias = "all")]
all_remotes: bool,
/// Show remote tracked branches only. Omits local Git-tracking branches by
/// default.
/// default
#[arg(long, short, conflicts_with_all = ["all_remotes"])]
tracked: bool,
/// Show conflicted branches only.
/// Show conflicted branches only
#[arg(long, short, conflicts_with_all = ["all_remotes"])]
conflicted: bool,
@ -57,7 +57,7 @@ pub struct BranchListArgs {
#[arg(value_parser = StringPattern::parse)]
names: Vec<StringPattern>,
/// Show branches whose local targets are in the given revisions.
/// Show branches whose local targets are in the given revisions
///
/// Note that `-r deleted_branch` will not work since `deleted_branch`
/// wouldn't have a local target.

View file

@ -44,7 +44,7 @@ use crate::cli_util::{CommandHelper, RemoteBranchName, RemoteBranchNamePattern};
use crate::command_error::{user_error, CommandError};
use crate::ui::Ui;
/// Manage branches.
/// Manage branches
///
/// For information about branches, see
/// https://github.com/martinvonz/jj/blob/main/docs/branches.md.

View file

@ -20,16 +20,15 @@ use crate::cli_util::CommandHelper;
use crate::command_error::{user_error, CommandError};
use crate::ui::Ui;
/// Rename `old` branch name to `new` branch name.
/// Rename `old` branch name to `new` branch name
///
/// The new branch name points at the same commit as the old
/// branch name.
/// The new branch name points at the same commit as the old branch name.
#[derive(clap::Args, Clone, Debug)]
pub struct BranchRenameArgs {
/// The old name of the branch.
/// The old name of the branch
old: String,
/// The new name of the branch.
/// The new name of the branch
new: String,
}

View file

@ -20,18 +20,18 @@ use crate::cli_util::{CommandHelper, RevisionArg};
use crate::command_error::{user_error_with_hint, CommandError};
use crate::ui::Ui;
/// Update an existing branch to point to a certain commit.
/// Update an existing branch to point to a certain commit
#[derive(clap::Args, Clone, Debug)]
pub struct BranchSetArgs {
/// The branch's target revision.
/// The branch's target revision
#[arg(long, short)]
revision: Option<RevisionArg>,
/// Allow moving the branch backwards or sideways.
/// Allow moving the branch backwards or sideways
#[arg(long, short = 'B')]
allow_backwards: bool,
/// The branches to update.
/// The branches to update
#[arg(required = true)]
names: Vec<String>,
}

View file

@ -225,7 +225,7 @@ Apply the reverse of a revision on top of another revision
## `jj branch`
Manage branches.
Manage branches
For information about branches, see https://github.com/martinvonz/jj/blob/main/docs/branches.md.
@ -277,7 +277,7 @@ Delete an existing branch and propagate the deletion to remotes on the next push
## `jj branch forget`
Forget everything about a branch, including its local and remote targets.
Forget everything about a branch, including its local and remote targets
A forgotten branch will not impact remotes on future pushes. It will be recreated on future pulls if it still exists in the remote.
@ -312,7 +312,7 @@ For information about branches, see https://github.com/martinvonz/jj/blob/main/d
* `-a`, `--all-remotes` — Show all tracking and non-tracking remote branches including the ones whose targets are synchronized with the local branches
* `-t`, `--tracked` — Show remote tracked branches only. Omits local Git-tracking branches by default
* `-c`, `--conflicted` — Show conflicted branches only
* `-r`, `--revisions <REVISIONS>` — Show branches whose local targets are in the given revisions.
* `-r`, `--revisions <REVISIONS>` — Show branches whose local targets are in the given revisions
Note that `-r deleted_branch` will not work since `deleted_branch` wouldn't have a local target.
* `-T`, `--template <TEMPLATE>` — Render each branch using the given template
@ -355,7 +355,7 @@ $ jj branch move --from 'heads(::@- & branches())' --to @-
## `jj branch rename`
Rename `old` branch name to `new` branch name.
Rename `old` branch name to `new` branch name
The new branch name points at the same commit as the old branch name.