Skip to content

Commit

Permalink
cli: simplify help about default "log -r"
Browse files Browse the repository at this point in the history
Since we've moved the default log revset to config/*.toml at 3dab92d, we don't
have to repeat the default value. It can be queried by "jj config list". I also
split the help paragraphs.
  • Loading branch information
yuja committed Oct 1, 2024
1 parent 0ac6df7 commit 1f5835c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cli/src/commands/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ use crate::ui::Ui;
/// rendered as a synthetic node labeled "(elided revisions)".
#[derive(clap::Args, Clone, Debug)]
pub(crate) struct LogArgs {
/// Which revisions to show. If no paths nor revisions are specified, this
/// defaults to the `revsets.log` setting, or `@ |
/// ancestors(immutable_heads().., 2) | trunk()` if it is not set.
/// Which revisions to show
///
/// If no paths nor revisions are specified, this defaults to the
/// `revsets.log` setting.
#[arg(long, short)]
revisions: Vec<RevisionArg>,
/// Show revisions modifying the given paths
Expand Down
4 changes: 3 additions & 1 deletion cli/tests/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,9 @@ Spans of revisions that are not included in the graph per `--revisions` are rend
###### **Options:**
* `-r`, `--revisions <REVISIONS>` — Which revisions to show. If no paths nor revisions are specified, this defaults to the `revsets.log` setting, or `@ | ancestors(immutable_heads().., 2) | trunk()` if it is not set
* `-r`, `--revisions <REVISIONS>` — Which revisions to show
If no paths nor revisions are specified, this defaults to the `revsets.log` setting.
* `--reversed` — Show revisions in the opposite order (older revisions first)
* `-n`, `--limit <LIMIT>` — Limit number of revisions to show
Expand Down

0 comments on commit 1f5835c

Please sign in to comment.