-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Explain what elided revisions are
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
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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). | ||
|