Skip to content

Commit

Permalink
docs: update alias in tutorial to not use public_heads() revset
Browse files Browse the repository at this point in the history
We don't update public heads very well yet and I'd like to take a
shortcut and simply not have care about public heads for now.
  • Loading branch information
martinvonz committed Oct 20, 2021
1 parent 23c3e02 commit 579bd4b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,12 @@ It's the root commit of every repo. The `root` symbol in the revset matches it.)
There are also operators for getting the parents (`:foo`), children `foo:`,
ancestors (`,,foo`), descendants (`foo,,`), DAG range (`foo,,bar`, like
`git log --ancestry-path`), range (`foo,,,bar`, like Git's `foo..bar`). There
are also a few more functions, such as `public_heads()`, which is the set of
revisions that have Git remote-tracking branches pointing to them, except those
that are ancestors of other revisions in the set. Let's define an alias based on
that by adding the following to `~/.jjconfig`:
are also a few more functions, such as `heads(<set>)`, which filters out
revisions in the input set if they're ancestors of other revisions in the set.
Let's define an alias based on that by adding the following to `~/.jjconfig`:
```
[alias]
l = ["log", "-r", "(public_heads(),,,@),,"]
l = ["log", "-r", "(heads(remote_branches()),,,@),,"]
```

The alias lets us run `jj l` to see the commits we have created between public
Expand Down

0 comments on commit 579bd4b

Please sign in to comment.