Fossil SCM
Mention the tricks to preview glob expansion with the `test-echo' command, and to try glob matching with `test-glob'.
Commit
9a428be5142e482fa1ab868908dee927f6290d4e3f68e0c3c6e5c01966124252
Parent
1a305a5ceb9f329…
1 file changed
+18
+18
| --- www/globs.md | ||
| +++ www/globs.md | ||
| @@ -429,10 +429,28 @@ | ||
| 429 | 429 | files, it is passed into Fossil's `main()` function as-is by the C |
| 430 | 430 | runtime system. Since Fossil uses commas to separate multiple glob |
| 431 | 431 | patterns, this means "all files at the root of the Fossil checkout |
| 432 | 432 | directory and nothing else." |
| 433 | 433 | |
| 434 | + | |
| 435 | +## Experimenting | |
| 436 | + | |
| 437 | +To preview the effects of command line glob pattern expansion for | |
| 438 | +various glob patterns (unquoted, quoted, comma-terminated), for any | |
| 439 | +combination of command shell and Fossil executable, on both POSIX | |
| 440 | +systems and Windows, the [`test-echo`][] command can be injected as | |
| 441 | +the first argument on the Fossil command line: | |
| 442 | + | |
| 443 | + $ fossil test-echo setting crlf-glob "*" | |
| 444 | + $ echo * | fossil test-echo setting crlf-glob --args - | |
| 445 | + | |
| 446 | +Moreover, the [`test-glob`][] command is handy to test if a string | |
| 447 | +matches a glob pattern. | |
| 448 | + | |
| 449 | +[`test-echo`]: /help?cmd=test-echo | |
| 450 | +[`test-glob`]: /help?cmd=test-glob | |
| 451 | + | |
| 434 | 452 | |
| 435 | 453 | ## Converting `.gitignore` to `ignore-glob` |
| 436 | 454 | |
| 437 | 455 | Many other version control systems handle the specific case of |
| 438 | 456 | ignoring certain files differently from fossil: they have you create |
| 439 | 457 |
| --- www/globs.md | |
| +++ www/globs.md | |
| @@ -429,10 +429,28 @@ | |
| 429 | files, it is passed into Fossil's `main()` function as-is by the C |
| 430 | runtime system. Since Fossil uses commas to separate multiple glob |
| 431 | patterns, this means "all files at the root of the Fossil checkout |
| 432 | directory and nothing else." |
| 433 | |
| 434 | |
| 435 | ## Converting `.gitignore` to `ignore-glob` |
| 436 | |
| 437 | Many other version control systems handle the specific case of |
| 438 | ignoring certain files differently from fossil: they have you create |
| 439 |
| --- www/globs.md | |
| +++ www/globs.md | |
| @@ -429,10 +429,28 @@ | |
| 429 | files, it is passed into Fossil's `main()` function as-is by the C |
| 430 | runtime system. Since Fossil uses commas to separate multiple glob |
| 431 | patterns, this means "all files at the root of the Fossil checkout |
| 432 | directory and nothing else." |
| 433 | |
| 434 | |
| 435 | ## Experimenting |
| 436 | |
| 437 | To preview the effects of command line glob pattern expansion for |
| 438 | various glob patterns (unquoted, quoted, comma-terminated), for any |
| 439 | combination of command shell and Fossil executable, on both POSIX |
| 440 | systems and Windows, the [`test-echo`][] command can be injected as |
| 441 | the first argument on the Fossil command line: |
| 442 | |
| 443 | $ fossil test-echo setting crlf-glob "*" |
| 444 | $ echo * | fossil test-echo setting crlf-glob --args - |
| 445 | |
| 446 | Moreover, the [`test-glob`][] command is handy to test if a string |
| 447 | matches a glob pattern. |
| 448 | |
| 449 | [`test-echo`]: /help?cmd=test-echo |
| 450 | [`test-glob`]: /help?cmd=test-glob |
| 451 | |
| 452 | |
| 453 | ## Converting `.gitignore` to `ignore-glob` |
| 454 | |
| 455 | Many other version control systems handle the specific case of |
| 456 | ignoring certain files differently from fossil: they have you create |
| 457 |