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 54d954c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 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 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 54d954c

Please sign in to comment.