Skip to content

Commit

Permalink
docs: Explain what elided revisions are
Browse files Browse the repository at this point in the history
A common question is asking how to show elided revisions. This FAQ
explains why revisions are elided and how to display them.
  • Loading branch information
jennings committed Jan 11, 2025
1 parent f9dad76 commit 8c18143
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,42 @@ revision visible again.

See [revsets] and [templates] for further guidance.

### What are elided revisions in the output of `jj log`? How can I display them?

"Elided revisions" appears in the log when one revision descends from another,
both are in the revset, but the revisions connecting them are _not_ in the
revset.

For example, suppose you log the revset `tyl|mus` which contains exactly two
revisions:

```sh
$ jj log -r 'tyl|mus'
○ musnqzvt [email protected] 1 minute ago 9a09f8a5
│ Revision C
~ (elided revisions)
○ tylynnzk [email protected] 1 minute ago f26967c8
│ Revision A
```

Only the two revisions in the revset are displayed. The text "(elided
revisions)" is shown to indicate that `musnqzvt` descends from `tylynnzk`, but
the nodes connecting them are not in the revset.

To view the elided revisions, change the [revset expression](revsets.md) so it
includes the connecting revisions. The `connected()` revset function does
exactly this:

```sh
$ jj log -r 'connected(tyl|mus)'
○ musnqzvt [email protected] 43 seconds ago 9a09f8a5
│ Revision C
○ rsvnrznr [email protected] 43 seconds ago 5b490f30
│ Revision B
○ tylynnzk [email protected] 43 seconds ago f26967c8
│ Revision A
```

### How can I get `jj log` to show me what `git log` would show me?

Use `jj log -r ..`. The `..` [operator] lists all visible commits in the repo, excluding the root (which is never interesting and is shared by all repos).
Expand Down

0 comments on commit 8c18143

Please sign in to comment.