diff --git a/cli/src/commands/log.rs b/cli/src/commands/log.rs index 093da0d4979..d3f47c4e403 100644 --- a/cli/src/commands/log.rs +++ b/cli/src/commands/log.rs @@ -61,11 +61,16 @@ use crate::ui::Ui; /// [Immutable revisions] have a `◆` symbol. Other commits have a `○` symbol. /// All of these symbols can be [customized]. /// +/// Changes with a ?? after their ID are [divergent]. +/// /// [Immutable revisions]: /// https://docs.jj-vcs.dev/latest/config/#set-of-immutable-commits /// /// [customized]: /// https://docs.jj-vcs.dev/latest/config/#node-style +/// +/// [divergent]: +/// https://docs.jj-vcs.dev/latest/guides/divergence/ #[derive(clap::Args, Clone, Debug)] pub(crate) struct LogArgs { /// Which revisions to show diff --git a/docs/glossary.md b/docs/glossary.md index 158392ed619..bcd176b525f 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -107,7 +107,8 @@ call that a [divergent change](#divergent-change). ## Divergent change A divergent change is a [change](#change) that has more than one -[visible commit](#visible-commits). +[visible commit](#visible-commits). These changes are displayed with a `??` +after their change ID. ## Head diff --git a/docs/guides/divergence.md b/docs/guides/divergence.md index 1d2c2a3b157..5380e7b9401 100644 --- a/docs/guides/divergence.md +++ b/docs/guides/divergence.md @@ -5,6 +5,14 @@ A [divergent change] occurs when multiple [visible commits] have the same change ID. +These changes are displayed with a `??` after their change ID: + +```shell +$ jj log +@ mzvwutvl?? test.user@example.com 2001-02-03 08:05:12 29d07a2d +│ a divergent change +``` + Normally, when commits are rewritten, the original version (the "predecessor") becomes hidden and the new commit (the "successor") is visible. Thus, only one commit with a given change ID is visible at a time.