Fossil SCM

Assorted tweaks to new Platform Quirks section of www/globs.md after re-reading it.

wyoung 2017-05-01 13:57 glob-docs
Commit a53d3b7db1339714df52c8874473f3f57c22c797d59163a080b02516ace42a49
1 file changed +17 -14
+17 -14
--- www/globs.md
+++ www/globs.md
@@ -249,12 +249,12 @@
249249
Fossil glob patterns are based on the glob pattern feature of POSIX
250250
shells. Fossil glob patterns also have a quoting mechanism, discussed
251251
above. Because other parts of your operating system may interpret glob
252252
patterns and quotes separately from Fossil, it is often difficult to
253253
give glob patterns correctly to Fossil on the command line. Quotes and
254
-special characters in glob patterns are likely to interpreted when given
255
-as part of a `fossil` command, causing unexpected behavior.
254
+special characters in glob patterns are likely to be interpreted when
255
+given as part of a `fossil` command, causing unexpected behavior.
256256
257257
These problems do not affect [versioned settings
258258
files](/doc/trunk/www/settings.wiki) or Admin → Settings in Fossil
259259
UI. Consequently, it is better to set long-term `*-glob` settings via
260260
these methods than to use `fossil settings` commands.
@@ -304,26 +304,28 @@
304304
mentions:
305305
306306
$ fossil add --ignore 'REALLY SECRET STUFF.txt' RE*
307307
308308
You might think that would add everything beginning with `RE` *except*
309
-for `REALLY SECRET STUFF.txt`, but Fossil when a file is given
310
-explicitly and found in the ignore list, Fossil asks what you want to do
311
-with it in the default case, and doesn't even ask if gave `-f` or
312
-`--force` along with `--ignore`.
309
+for `REALLY SECRET STUFF.txt`, but when a file is both given explicitly
310
+to Fossil and also matches an ignore rule, Fossil asks what you want to
311
+do with it in the default case; it doesn't even ask if you gave the `-f`
312
+or `--force` option along with `--ignore`.
313313
314314
The spaces in the ignored file name above bring us to another point:
315
-file names must be quoted in Fossil glob patterns, but the shell
316
-interprets quotation marks itself. There are a couple of ways to fix
317
-both this and the previous problem:
315
+such file names must be quoted in Fossil glob patterns, lest Fossil
316
+interpret it as multiple glob patterns, but the shell interprets
317
+quotation marks itself.
318
+
319
+One way to fix both this and the previous problem is:
318320
319321
$ fossil add --ignore "'REALLY SECRET STUFF.txt'" READ*
320322
321323
The nested quotation marks cause the inner set to be passed through to
322
-Fossil, and the more specific glob pattern expanded by the shell (that
323
-is, `READ*` vs `RE*`) avoids a conflict between explicitly-listed files
324
-and `--ignore` rules in the `fossil add` command.
324
+Fossil, and the more specific glob pattern at the end — that is,
325
+`READ*` vs `RE*` — avoids a conflict between explicitly-listed
326
+files and `--ignore` rules in the `fossil add` command.
325327
326328
Another solution would be to use shell escaping instead of nested
327329
quoting:
328330
329331
$ fossil add --ignore "\"REALLY SECRET STUFF.txt\"" READ*
@@ -386,12 +388,13 @@
386388
or the [Windows Subsystem for
387389
Linux](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux). (The
388390
latter is sometimes incorrectly called "Bash on Windows" or "Ubuntu on
389391
Windows.") See the POSIX Systems section above for those cases.)
390392
391
-For example, consider how you would set `crlf-glob` to `*`. The
392
-naïve approach will not work:
393
+For example, consider how you would set `crlf-glob` to `*` in order to
394
+disable Fossil's "looks like a binary file" checks. The naïve
395
+approach will not work:
393396
394397
C:\...> fossil setting crlf-glob *
395398
396399
The C runtime library will expand that to the list of all files in the
397400
current directory, which will probably cause a Fossil error because
398401
--- www/globs.md
+++ www/globs.md
@@ -249,12 +249,12 @@
249 Fossil glob patterns are based on the glob pattern feature of POSIX
250 shells. Fossil glob patterns also have a quoting mechanism, discussed
251 above. Because other parts of your operating system may interpret glob
252 patterns and quotes separately from Fossil, it is often difficult to
253 give glob patterns correctly to Fossil on the command line. Quotes and
254 special characters in glob patterns are likely to interpreted when given
255 as part of a `fossil` command, causing unexpected behavior.
256
257 These problems do not affect [versioned settings
258 files](/doc/trunk/www/settings.wiki) or Admin → Settings in Fossil
259 UI. Consequently, it is better to set long-term `*-glob` settings via
260 these methods than to use `fossil settings` commands.
@@ -304,26 +304,28 @@
304 mentions:
305
306 $ fossil add --ignore 'REALLY SECRET STUFF.txt' RE*
307
308 You might think that would add everything beginning with `RE` *except*
309 for `REALLY SECRET STUFF.txt`, but Fossil when a file is given
310 explicitly and found in the ignore list, Fossil asks what you want to do
311 with it in the default case, and doesn't even ask if gave `-f` or
312 `--force` along with `--ignore`.
313
314 The spaces in the ignored file name above bring us to another point:
315 file names must be quoted in Fossil glob patterns, but the shell
316 interprets quotation marks itself. There are a couple of ways to fix
317 both this and the previous problem:
 
 
318
319 $ fossil add --ignore "'REALLY SECRET STUFF.txt'" READ*
320
321 The nested quotation marks cause the inner set to be passed through to
322 Fossil, and the more specific glob pattern expanded by the shell (that
323 is, `READ*` vs `RE*`) avoids a conflict between explicitly-listed files
324 and `--ignore` rules in the `fossil add` command.
325
326 Another solution would be to use shell escaping instead of nested
327 quoting:
328
329 $ fossil add --ignore "\"REALLY SECRET STUFF.txt\"" READ*
@@ -386,12 +388,13 @@
386 or the [Windows Subsystem for
387 Linux](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux). (The
388 latter is sometimes incorrectly called "Bash on Windows" or "Ubuntu on
389 Windows.") See the POSIX Systems section above for those cases.)
390
391 For example, consider how you would set `crlf-glob` to `*`. The
392 naïve approach will not work:
 
393
394 C:\...> fossil setting crlf-glob *
395
396 The C runtime library will expand that to the list of all files in the
397 current directory, which will probably cause a Fossil error because
398
--- www/globs.md
+++ www/globs.md
@@ -249,12 +249,12 @@
249 Fossil glob patterns are based on the glob pattern feature of POSIX
250 shells. Fossil glob patterns also have a quoting mechanism, discussed
251 above. Because other parts of your operating system may interpret glob
252 patterns and quotes separately from Fossil, it is often difficult to
253 give glob patterns correctly to Fossil on the command line. Quotes and
254 special characters in glob patterns are likely to be interpreted when
255 given as part of a `fossil` command, causing unexpected behavior.
256
257 These problems do not affect [versioned settings
258 files](/doc/trunk/www/settings.wiki) or Admin → Settings in Fossil
259 UI. Consequently, it is better to set long-term `*-glob` settings via
260 these methods than to use `fossil settings` commands.
@@ -304,26 +304,28 @@
304 mentions:
305
306 $ fossil add --ignore 'REALLY SECRET STUFF.txt' RE*
307
308 You might think that would add everything beginning with `RE` *except*
309 for `REALLY SECRET STUFF.txt`, but when a file is both given explicitly
310 to Fossil and also matches an ignore rule, Fossil asks what you want to
311 do with it in the default case; it doesn't even ask if you gave the `-f`
312 or `--force` option along with `--ignore`.
313
314 The spaces in the ignored file name above bring us to another point:
315 such file names must be quoted in Fossil glob patterns, lest Fossil
316 interpret it as multiple glob patterns, but the shell interprets
317 quotation marks itself.
318
319 One way to fix both this and the previous problem is:
320
321 $ fossil add --ignore "'REALLY SECRET STUFF.txt'" READ*
322
323 The nested quotation marks cause the inner set to be passed through to
324 Fossil, and the more specific glob pattern at the end — that is,
325 `READ*` vs `RE*` — avoids a conflict between explicitly-listed
326 files and `--ignore` rules in the `fossil add` command.
327
328 Another solution would be to use shell escaping instead of nested
329 quoting:
330
331 $ fossil add --ignore "\"REALLY SECRET STUFF.txt\"" READ*
@@ -386,12 +388,13 @@
388 or the [Windows Subsystem for
389 Linux](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux). (The
390 latter is sometimes incorrectly called "Bash on Windows" or "Ubuntu on
391 Windows.") See the POSIX Systems section above for those cases.)
392
393 For example, consider how you would set `crlf-glob` to `*` in order to
394 disable Fossil's "looks like a binary file" checks. The naïve
395 approach will not work:
396
397 C:\...> fossil setting crlf-glob *
398
399 The C runtime library will expand that to the list of all files in the
400 current directory, which will probably cause a Fossil error because
401

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button