docs: explain what .. etc are shorthand for

`..` is shorthand for `root()..visible_head()`, for example. We don't
seem to explain that anywhere. I hope mentioning that will help
readers understand the relationship between the shorthands and the
full `x..y`, and also to see the correspondence between `..` and `::`
(in how their default left and right operands are the same).
This commit is contained in:
Martin von Zweigbergk 2024-06-16 14:48:02 -07:00 committed by Martin von Zweigbergk
parent ce0c53796c
commit 182cf6d5e2

View file

@ -52,18 +52,22 @@ only symbols.
* `x-`: Parents of `x`, can be empty.
* `x+`: Children of `x`, can be empty.
* `x::`: Descendants of `x`, including the commits in `x` itself.
* `x..`: Revisions that are not ancestors of `x`.
* `::x`: Ancestors of `x`, including the commits in `x` itself.
* `x::`: Descendants of `x`, including the commits in `x` itself. Shorthand for
`x::visible_heads()`.
* `x..`: Revisions that are not ancestors of `x`. Shorthand for
`x..visible_heads()`.
* `::x`: Ancestors of `x`, including the commits in `x` itself. Shorthand for
`root()::x`.
* `..x`: Ancestors of `x`, including the commits in `x` itself, but excluding
the root commit. Equivalent to `::x ~ root()`.
the root commit. Shorthand for `root()..x`. Equivalent to `::x ~ root()`.
* `x::y`: Descendants of `x` that are also ancestors of `y`. Equivalent
to `x:: & ::y`. This is what `git log` calls `--ancestry-path x..y`.
* `x..y`: Ancestors of `y` that are not also ancestors of `x`. Equivalent to
`::y ~ ::x`. This is what `git log` calls `x..y` (i.e. the same as we call it).
* `::`: All visible commits in the repo. Equivalent to `all()`.
* `::`: All visible commits in the repo. Shorthand for
`root()::visible_heads()`. Equivalent to `all()`.
* `..`: All visible commits in the repo, but excluding the root commit.
Equivalent to `~root()`.
Shorthand for `root()..visible_heads()`. Equivalent to `~root()`.
* `~x`: Revisions that are not in `x`.
* `x & y`: Revisions that are in both `x` and `y`.
* `x ~ y`: Revisions that are in `x` but not in `y`.