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