just playing with tangled
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

revsets.md: clarify string patterns and file patterns

I had to increase indent on two list items for multiple paragraphs to work in
MkDocs.

+39 -27
+39 -27
docs/revsets.md
··· 88 88 * `none()`: No commits. This function is rarely useful; it is provided for 89 89 completeness. 90 90 * `branches([pattern])`: All local branch targets. If `pattern` is specified, 91 - branches whose name contains the given string are selected. For example, 92 - `branches(push)` would match the branches `push-123` and `repushed` but not 93 - the branch `main`. If a branch is in a conflicted state, all its possible 94 - targets are included. 95 - * `remote_branches([branch_pattern[, [remote=]remote_pattern]])`: All remote 96 - branch targets across all remotes. If just the `branch_pattern` is specified, 97 - branches whose name contains the given string across all remotes are 98 - selected. If both `branch_pattern` and `remote_pattern` are specified, the 99 - selection is further restricted to just the remotes whose name contains 100 - `remote_pattern`. For example, `remote_branches(push, ri)` would match the 101 - branches `push-123@origin` and `repushed@private` but not `push-123@upstream` 102 - or `main@origin` or `main@upstream`. If a branch is in a conflicted state, 103 - all its possible targets are included. 91 + this selects the branches whose name match the given [string 92 + pattern](#string-patterns). For example, `branches(push)` would match the 93 + branches `push-123` and `repushed` but not the branch `main`. If a branch is 94 + in a conflicted state, all its possible targets are included. 95 + 96 + * `remote_branches([branch_pattern[, [remote=]remote_pattern]])`: All remote 97 + branch targets across all remotes. If just the `branch_pattern` is 98 + specified, the branches whose names match the given [string 99 + pattern](#string-patterns) across all remotes are selected. If both 100 + `branch_pattern` and `remote_pattern` are specified, the selection is 101 + further restricted to just the remotes whose names match `remote_pattern`. 102 + 103 + For example, `remote_branches(push, ri)` would match the branches 104 + `push-123@origin` and `repushed@private` but not `push-123@upstream` or 105 + `main@origin` or `main@upstream`. If a branch is in a conflicted state, all 106 + its possible targets are included. 107 + 104 108 * `tags()`: All tag targets. If a tag is in a conflicted state, all its 105 109 possible targets are included. 106 110 * `git_refs()`: All Git ref targets as of the last import. If a Git ref ··· 120 124 * `latest(x[, count])`: Latest `count` commits in `x`, based on committer 121 125 timestamp. The default `count` is 1. 122 126 * `merges()`: Merge commits. 123 - * `description(pattern)`: Commits with the given string in their 124 - description. 125 - * `author(pattern)`: Commits with the given string in the author's name or 126 - email. 127 + * `description(pattern)`: Commits that have a description matching the given 128 + [string pattern](#string-patterns). 129 + * `author(pattern)`: Commits with the author's name or email matching the given 130 + [string pattern](#string-patterns). 127 131 * `mine()`: Commits where the author's email matches the email of the current 128 132 user. 129 - * `committer(pattern)`: Commits with the given string in the committer's 130 - name or email. 133 + * `committer(pattern)`: Commits with the committer's name or email matching the 134 + given [string pattern](#string-patterns). 131 135 * `empty()`: Commits modifying no files. This also includes `merges()` without 132 136 user modifications and `root()`. 133 - * `file(pattern..)`: Commits modifying the paths specified by the `pattern..`. 134 - Paths are relative to the directory `jj` was invoked from. A directory name 135 - will match all files in that directory and its subdirectories. For example, 136 - `file(foo)` will match files `foo`, `foo/bar`, `foo/bar/baz`, but not file 137 - `foobar`. 137 + 138 + * `file(relativepath)` or `file("relativepath"[, "relativepath"]...)`: Commits 139 + modifying one of the paths specified. Currently, string patterns are *not* 140 + supported in the path arguments. 141 + 142 + Paths are relative to the directory `jj` was invoked from. A directory name 143 + will match all files in that directory and its subdirectories. 144 + 145 + For example, `file(foo)` will match files `foo`, `foo/bar`, `foo/bar/baz`. 146 + It will *not* match `foobar` or `bar/foo`. 147 + 138 148 * `conflict()`: Commits with conflicts. 139 149 * `present(x)`: Same as `x`, but evaluated to `none()` if any of the commits 140 150 in `x` doesn't exist (e.g. is an unknown branch name.) 141 151 142 152 ## String patterns 143 153 144 - Functions that perform string matching support the following pattern syntax. 154 + Functions that perform string matching support the following pattern syntax: 145 155 146 - * `"string"`, `substring:"string"`: Matches strings that contain `string`. 156 + * `"string"`, or `string` (the quotes are optional), or `substring:"string"`: 157 + Matches strings that contain `string`. 147 158 * `exact:"string"`: Matches strings exactly equal to `string`. 148 - * `glob:"pattern"`: Matches strings with Unix-style shell wildcard `pattern`. 159 + * `glob:"pattern"`: Matches strings with Unix-style shell [wildcard 160 + `pattern`](https://docs.rs/glob/latest/glob/struct.Pattern.html). 149 161 150 162 ## Aliases 151 163