docs: mention ?? means 'divergence'

While divergence is talked about in the documentation, few places actually
mention how divergent changes are displayed. I've added such notes to the help
out put of `jj log`, the glossary, and added an example to the guide we have on
divergence.

Fixes #6365
This commit is contained in:
Steve Klabnik
2025-12-05 16:02:36 -06:00
parent 31aae4cb26
commit 7da170d53f
4 changed files with 19 additions and 1 deletions

View File

@@ -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

View File

@@ -1771,10 +1771,14 @@ Spans of revisions that are not included in the graph per `--revisions` are rend
The working-copy commit is indicated by a `@` symbol in the graph. [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/
**Usage:** `jj log [OPTIONS] [FILESETS]...`
###### **Arguments:**

View File

@@ -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

View File

@@ -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.