ok/jj
1
0
Fork 0
forked from mirrors/jj

trunk() docs fix: commits aren't tried in order; newest commit wins

That's my understanding of how `latest()` revset works.
This commit is contained in:
Ilya Grigoriev 2023-09-19 19:20:30 -07:00
parent f39b0d24c8
commit 0c31e0ba61

View file

@ -167,8 +167,9 @@ See [revsets.toml](https://github.com/martinvonz/jj/blob/main/cli/src/config/rev
for a comprehensive list. for a comprehensive list.
* `trunk()`: Resolves to the head commit for the trunk branch of the `origin` * `trunk()`: Resolves to the head commit for the trunk branch of the `origin`
remote. The branches `main`, `master`, and `trunk` are tried in order. remote. The branches `main`, `master`, and `trunk` are tried. If more than one
If none of the branches exist, it evaluates to `root()`. potential trunk commit exists, the newest one is chosen. If none of the
branches exist, the revset evaluates to `root()`.
You can [override](./config.md) this as appropriate. If you do, make sure it You can [override](./config.md) this as appropriate. If you do, make sure it
always resolves to exactly one commit. For example: always resolves to exactly one commit. For example: