237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
|
timeline on. It also has the query parameters `t=TAG` and `r=TAG` that
names a tag to focus on, which can be configured with `ms=STYLE` to
use a glob pattern to match tag names instead of the default exact
match or a couple of other comparison styles.
The pages [`/tarball`][] and [`/zip`][] generate compressed archives
of a specific checkin. They may be further restricted by query
parameters that specify GLOBs that name files to include or exclude
rather than taking the entire checkin.
[`/timeline`]: /help?cmd=/timeline
[`/tarball`]: /help?cmd=/tarball
[`/zip`]: /help?cmd=/zip
## Platform quirks
|
|
|
|
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
|
timeline on. It also has the query parameters `t=TAG` and `r=TAG` that
names a tag to focus on, which can be configured with `ms=STYLE` to
use a glob pattern to match tag names instead of the default exact
match or a couple of other comparison styles.
The pages [`/tarball`][] and [`/zip`][] generate compressed archives
of a specific checkin. They may be further restricted by query
parameters that specify glob patterns that name files to include or
exclude rather than taking the entire checkin.
[`/timeline`]: /help?cmd=/timeline
[`/tarball`]: /help?cmd=/tarball
[`/zip`]: /help?cmd=/zip
## Platform quirks
|
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
|
fossil setting crlf-glob '*'
also works. Here the single quotes are unneeded since no white space
is mentioned in the pattern, but do no harm. The GLOB still matches
all the files.
## Implementation
Most of the implementation of glob pattern handling in fossil is found
in [`src/glob.c`][glob.c]. The canonical name of a file is implemented
in [`src/file.c`][file.c]. Each command that references a glob
constructs the target text from information specific to that command.
[glob.c]: https://www.fossil-scm.org/index.html/file/src/glob.c
[file.c]: https://www.fossil-scm.org/index.html/file/src/file.c
The actual matching is implemented in SQL, so the documentation for
`GLOB` and the other string matching operators in [SQLite]
(https://sqlite.org/lang_expr.html#like) is useful. Of course, the
SQLite source code and test harnesses also make entertaining reading:
* `src/func.c` [lines 570-768]
(https://www.sqlite.org/src/artifact?name=9d52522cc8ae7f5c&ln=570-768)
* `test/expr.test` [lines 586-673]
(https://www.sqlite.org/src/artifact?name=66a2c9ac34f74f03&ln=586-673)
|
|
>
>
>
>
>
>
>
|
>
>
|
<
>
|
|
|
|
>
|
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
|
fossil setting crlf-glob '*'
also works. Here the single quotes are unneeded since no white space
is mentioned in the pattern, but do no harm. The GLOB still matches
all the files.
## Implementation and References
Most of the implementation of glob pattern handling in fossil is found
`glob.c`, `file.c`, and each individual command and web page that uses
a glob pattern. Find commands and pages in the fossil sources by
looking for comments like `COMMAND: add` or `WEBPAGE: timeline` in
front of the function that implements the command or page in files
`src/*.c`. (Fossil's build system creates the tables used to dispatch
commands at build time by searching the sources for those comments.) A
few starting points:
* [`src/glob.c`][glob.c] implements glob pattern list loading,
parsing, and matching.
* [`src/file.c`][file.c] implements various kinds of canonical
names of a file.
[glob.c]: https://www.fossil-scm.org/index.html/file/src/glob.c
[file.c]: https://www.fossil-scm.org/index.html/file/src/file.c
The actual pattern matching is implemented in SQL, so the
documentation for `GLOB` and the other string matching operators in
[SQLite] (https://sqlite.org/lang_expr.html#like) is useful. Of
course, the SQLite source code and test harnesses also make
entertaining reading:
* `src/func.c` [lines 570-768]
(https://www.sqlite.org/src/artifact?name=9d52522cc8ae7f5c&ln=570-768)
* `test/expr.test` [lines 586-673]
(https://www.sqlite.org/src/artifact?name=66a2c9ac34f74f03&ln=586-673)
|