Skip to content

Commit

Permalink
docs: document that default log revset is only used when neither path…
Browse files Browse the repository at this point in the history
… nor revset is specified
  • Loading branch information
noahmayr committed Apr 1, 2024
1 parent 06e2fae commit 7d23f43
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions cli/src/commands/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ 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. Defaults to the `revsets.log` setting, or
/// `@ | ancestors(immutable_heads().., 2) | trunk()` if it is not set.
/// Which revisions to show. If no paths are specified, this defaults to the
/// `revsets.log` setting, or `@ | ancestors(immutable_heads().., 2) |
/// trunk()` if it is not set.
#[arg(long, short)]
revisions: Vec<RevisionArg>,
/// Show revisions modifying the given paths
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ Spans of revisions that are not included in the graph per `--revisions` are rend
###### **Options:**
* `-r`, `--revisions <REVISIONS>` — Which revisions to show. 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 are specified, this defaults to the `revsets.log` setting, or `@ | ancestors(immutable_heads().., 2) | trunk()` if it is not set
* `--reversed` — Show revisions in the opposite order (older revisions first)
Possible values: `true`, `false`
Expand Down
2 changes: 1 addition & 1 deletion docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ immutable even if the set is empty.

### Default revisions to log

You can configure the revisions `jj log` without `-r` should show.
You can configure the revisions `jj log` without `-r` or any specified paths should show.

```toml
# Show commits that are not in `main@origin`
Expand Down

0 comments on commit 7d23f43

Please sign in to comment.