···8888* `none()`: No commits. This function is rarely useful; it is provided for
8989 completeness.
9090* `branches([pattern])`: All local branch targets. If `pattern` is specified,
9191- branches whose name contains the given string are selected. For example,
9292- `branches(push)` would match the branches `push-123` and `repushed` but not
9393- the branch `main`. If a branch is in a conflicted state, all its possible
9494- targets are included.
9595-* `remote_branches([branch_pattern[, [remote=]remote_pattern]])`: All remote
9696- branch targets across all remotes. If just the `branch_pattern` is specified,
9797- branches whose name contains the given string across all remotes are
9898- selected. If both `branch_pattern` and `remote_pattern` are specified, the
9999- selection is further restricted to just the remotes whose name contains
100100- `remote_pattern`. For example, `remote_branches(push, ri)` would match the
101101- branches `push-123@origin` and `repushed@private` but not `push-123@upstream`
102102- or `main@origin` or `main@upstream`. If a branch is in a conflicted state,
103103- all its possible targets are included.
9191+ this selects the branches whose name match the given [string
9292+ pattern](#string-patterns). For example, `branches(push)` would match the
9393+ branches `push-123` and `repushed` but not the branch `main`. If a branch is
9494+ in a conflicted state, all its possible targets are included.
9595+9696+* `remote_branches([branch_pattern[, [remote=]remote_pattern]])`: All remote
9797+ branch targets across all remotes. If just the `branch_pattern` is
9898+ specified, the branches whose names match the given [string
9999+ pattern](#string-patterns) across all remotes are selected. If both
100100+ `branch_pattern` and `remote_pattern` are specified, the selection is
101101+ further restricted to just the remotes whose names match `remote_pattern`.
102102+103103+ For example, `remote_branches(push, ri)` would match the branches
104104+ `push-123@origin` and `repushed@private` but not `push-123@upstream` or
105105+ `main@origin` or `main@upstream`. If a branch is in a conflicted state, all
106106+ its possible targets are included.
107107+104108* `tags()`: All tag targets. If a tag is in a conflicted state, all its
105109 possible targets are included.
106110* `git_refs()`: All Git ref targets as of the last import. If a Git ref
···120124* `latest(x[, count])`: Latest `count` commits in `x`, based on committer
121125 timestamp. The default `count` is 1.
122126* `merges()`: Merge commits.
123123-* `description(pattern)`: Commits with the given string in their
124124- description.
125125-* `author(pattern)`: Commits with the given string in the author's name or
126126- email.
127127+* `description(pattern)`: Commits that have a description matching the given
128128+ [string pattern](#string-patterns).
129129+* `author(pattern)`: Commits with the author's name or email matching the given
130130+ [string pattern](#string-patterns).
127131* `mine()`: Commits where the author's email matches the email of the current
128132 user.
129129-* `committer(pattern)`: Commits with the given string in the committer's
130130- name or email.
133133+* `committer(pattern)`: Commits with the committer's name or email matching the
134134+given [string pattern](#string-patterns).
131135* `empty()`: Commits modifying no files. This also includes `merges()` without
132136 user modifications and `root()`.
133133-* `file(pattern..)`: Commits modifying the paths specified by the `pattern..`.
134134- Paths are relative to the directory `jj` was invoked from. A directory name
135135- will match all files in that directory and its subdirectories. For example,
136136- `file(foo)` will match files `foo`, `foo/bar`, `foo/bar/baz`, but not file
137137- `foobar`.
137137+138138+* `file(relativepath)` or `file("relativepath"[, "relativepath"]...)`: Commits
139139+ modifying one of the paths specified. Currently, string patterns are *not*
140140+ supported in the path arguments.
141141+142142+ Paths are relative to the directory `jj` was invoked from. A directory name
143143+ will match all files in that directory and its subdirectories.
144144+145145+ For example, `file(foo)` will match files `foo`, `foo/bar`, `foo/bar/baz`.
146146+ It will *not* match `foobar` or `bar/foo`.
147147+138148* `conflict()`: Commits with conflicts.
139149* `present(x)`: Same as `x`, but evaluated to `none()` if any of the commits
140150 in `x` doesn't exist (e.g. is an unknown branch name.)
141151142152## String patterns
143153144144-Functions that perform string matching support the following pattern syntax.
154154+Functions that perform string matching support the following pattern syntax:
145155146146-* `"string"`, `substring:"string"`: Matches strings that contain `string`.
156156+* `"string"`, or `string` (the quotes are optional), or `substring:"string"`:
157157+ Matches strings that contain `string`.
147158* `exact:"string"`: Matches strings exactly equal to `string`.
148148-* `glob:"pattern"`: Matches strings with Unix-style shell wildcard `pattern`.
159159+* `glob:"pattern"`: Matches strings with Unix-style shell [wildcard
160160+ `pattern`](https://docs.rs/glob/latest/glob/struct.Pattern.html).
149161150162## Aliases
151163