diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ebcb160c3..9d6bc49bdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * `ui.default-command` now accepts multiple string arguments, for more complex default `jj` commands. +* `jj log` now includes synthetic nodes in the graph where some revisions were + elided. + ### Fixed bugs ## [0.15.1] - 2024-03-06 diff --git a/cli/src/commands/log.rs b/cli/src/commands/log.rs index 20b6c75756..3aac0e91a8 100644 --- a/cli/src/commands/log.rs +++ b/cli/src/commands/log.rs @@ -32,6 +32,9 @@ use crate::ui::Ui; /// Renders a graphical view of the project's history with, ordered with /// children before parents. By default, the output only includes mutable /// revisions, along with some additional revisions for context. +/// +/// Spans of revisions that are not included in the graph per `--revisions` are +/// 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 diff --git a/cli/src/config-schema.json b/cli/src/config-schema.json index 29a0b3e552..d681632b5b 100644 --- a/cli/src/config-schema.json +++ b/cli/src/config-schema.json @@ -133,7 +133,7 @@ "log-synthetic-elided-nodes": { "type": "boolean", "description": "Whether to render elided parts of the graph as synthetic nodes.", - "default": false + "default": true }, "editor": { "type": "string", diff --git a/cli/src/config/misc.toml b/cli/src/config/misc.toml index 6802b92bca..824ea5d3f7 100644 --- a/cli/src/config/misc.toml +++ b/cli/src/config/misc.toml @@ -11,7 +11,7 @@ diff-instructions = true paginate = "auto" pager = { command = ["less", "-FRX"], env = { LESSCHARSET = "utf-8" } } log-word-wrap = false -log-synthetic-elided-nodes = false +log-synthetic-elided-nodes = true [snapshot] max-new-file-size = "1MiB" diff --git a/cli/tests/cli-reference@.md.snap b/cli/tests/cli-reference@.md.snap index ed3b507c9f..1c82c438d4 100644 --- a/cli/tests/cli-reference@.md.snap +++ b/cli/tests/cli-reference@.md.snap @@ -1014,6 +1014,8 @@ Show revision history Renders a graphical view of the project's history with, ordered with children before parents. By default, the output only includes mutable revisions, along with some additional revisions for context. +Spans of revisions that are not included in the graph per `--revisions` are rendered as a synthetic node labeled "(elided revisions)". + **Usage:** `jj log [OPTIONS] [PATHS]...` ###### **Arguments:** diff --git a/cli/tests/test_log_command.rs b/cli/tests/test_log_command.rs index 18561523ca..02a0a042a7 100644 --- a/cli/tests/test_log_command.rs +++ b/cli/tests/test_log_command.rs @@ -1356,6 +1356,7 @@ fn test_elided() { // Elide some commits from each side of the merge. It's unclear that a revision // was skipped on the left side. + test_env.add_config("ui.log-synthetic-elided-nodes = false"); insta::assert_snapshot!(get_log("@ | @- | description(initial)"), @r###" @ merge ├─╮