mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-06 07:52:50 +00:00
diffedit: separate extra help information in its own paragraph
This commit is contained in:
parent
a2e67bdd9b
commit
726cbbd66c
@ -46,14 +46,19 @@ use crate::ui::Ui;
|
|||||||
/// changes into or out of the parent revision.
|
/// changes into or out of the parent revision.
|
||||||
#[derive(clap::Args, Clone, Debug)]
|
#[derive(clap::Args, Clone, Debug)]
|
||||||
pub(crate) struct DiffeditArgs {
|
pub(crate) struct DiffeditArgs {
|
||||||
/// The revision to touch up. Defaults to @ if neither --to nor --from are
|
/// The revision to touch up
|
||||||
/// specified.
|
///
|
||||||
|
/// Defaults to @ if neither --to nor --from are specified.
|
||||||
#[arg(long, short)]
|
#[arg(long, short)]
|
||||||
revision: Option<RevisionArg>,
|
revision: Option<RevisionArg>,
|
||||||
/// Show changes from this revision. Defaults to @ if --to is specified.
|
/// Show changes from this revision
|
||||||
|
///
|
||||||
|
/// Defaults to @ if --to is specified.
|
||||||
#[arg(long, conflicts_with = "revision")]
|
#[arg(long, conflicts_with = "revision")]
|
||||||
from: Option<RevisionArg>,
|
from: Option<RevisionArg>,
|
||||||
/// Edit changes in this revision. Defaults to @ if --from is specified.
|
/// Edit changes in this revision
|
||||||
|
///
|
||||||
|
/// Defaults to @ if --from is specified.
|
||||||
#[arg(long, conflicts_with = "revision")]
|
#[arg(long, conflicts_with = "revision")]
|
||||||
to: Option<RevisionArg>,
|
to: Option<RevisionArg>,
|
||||||
/// Specify diff editor to be used
|
/// Specify diff editor to be used
|
||||||
|
@ -657,9 +657,15 @@ See `jj restore` if you want to move entire files from one revision to another.
|
|||||||
|
|
||||||
###### **Options:**
|
###### **Options:**
|
||||||
|
|
||||||
* `-r`, `--revision <REVISION>` — The revision to touch up. Defaults to @ if neither --to nor --from are specified
|
* `-r`, `--revision <REVISION>` — The revision to touch up
|
||||||
* `--from <FROM>` — Show changes from this revision. Defaults to @ if --to is specified
|
|
||||||
* `--to <TO>` — Edit changes in this revision. Defaults to @ if --from is specified
|
Defaults to @ if neither --to nor --from are specified.
|
||||||
|
* `--from <FROM>` — Show changes from this revision
|
||||||
|
|
||||||
|
Defaults to @ if --to is specified.
|
||||||
|
* `--to <TO>` — Edit changes in this revision
|
||||||
|
|
||||||
|
Defaults to @ if --from is specified.
|
||||||
* `--tool <NAME>` — Specify diff editor to be used
|
* `--tool <NAME>` — Specify diff editor to be used
|
||||||
|
|
||||||
|
|
||||||
|
@ -592,16 +592,15 @@ fn test_help() {
|
|||||||
let test_env = TestEnvironment::default();
|
let test_env = TestEnvironment::default();
|
||||||
|
|
||||||
let stdout = test_env.jj_cmd_success(test_env.env_root(), &["diffedit", "-h"]);
|
let stdout = test_env.jj_cmd_success(test_env.env_root(), &["diffedit", "-h"]);
|
||||||
insta::assert_snapshot!(stdout, @r###"
|
insta::assert_snapshot!(stdout, @r#"
|
||||||
Touch up the content changes in a revision with a diff editor
|
Touch up the content changes in a revision with a diff editor
|
||||||
|
|
||||||
Usage: jj diffedit [OPTIONS]
|
Usage: jj diffedit [OPTIONS]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-r, --revision <REVISION> The revision to touch up. Defaults to @ if neither --to nor --from are
|
-r, --revision <REVISION> The revision to touch up
|
||||||
specified
|
--from <FROM> Show changes from this revision
|
||||||
--from <FROM> Show changes from this revision. Defaults to @ if --to is specified
|
--to <TO> Edit changes in this revision
|
||||||
--to <TO> Edit changes in this revision. Defaults to @ if --from is specified
|
|
||||||
--tool <NAME> Specify diff editor to be used
|
--tool <NAME> Specify diff editor to be used
|
||||||
-h, --help Print help (see more with '--help')
|
-h, --help Print help (see more with '--help')
|
||||||
|
|
||||||
@ -615,7 +614,7 @@ fn test_help() {
|
|||||||
--quiet Silence non-primary command output
|
--quiet Silence non-primary command output
|
||||||
--no-pager Disable the pager
|
--no-pager Disable the pager
|
||||||
--config-toml <TOML> Additional configuration options (can be repeated)
|
--config-toml <TOML> Additional configuration options (can be repeated)
|
||||||
"###);
|
"#);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user