37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
`[^`. At any other place, `]` ends the list.
* Include `^` in a list by placing anywhere except first after the
`[`.
Some examples:
[a-d] Matches any one of 'a', 'b', 'c', or 'd'
[a-] Matches either 'a' or '-'
[][] Matches either ']' or '['
[^]] Matches exactly one character other than ']'
[]^] Matches either ']' or '^'
The glob is compared to the canonical name of the file in the checkout
tree, and must match the entire name to be considered a match.
Unlike typical Unix shell globs, wildcard sequences are allowed to
match '/' directory separators as well as the initial '.' in the name
of a hidden file or directory.
A list of GLOBs is simply one or more GLOBs separated by whitespace or
commas. If a GLOB must contain a space or comma, it can be quoted with
either single or double quotation marks.
Since a newline is considered to be whitespace, a list of GLOBs in a
|
|
|
|
|
|
|
|
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
`[^`. At any other place, `]` ends the list.
* Include `^` in a list by placing anywhere except first after the
`[`.
Some examples:
[a-d] Matches any one of `a`, `b`, `c`, or `d`
[a-] Matches either `a` or `-`
[][] Matches either `]` or `[`
[^]] Matches exactly one character other than `]`
[]^] Matches either `]` or `^`
The glob is compared to the canonical name of the file in the checkout
tree, and must match the entire name to be considered a match.
Unlike typical Unix shell globs, wildcard sequences are allowed to
match `/` directory separators as well as the initial `.` in the name
of a hidden file or directory.
A list of GLOBs is simply one or more GLOBs separated by whitespace or
commas. If a GLOB must contain a space or comma, it can be quoted with
either single or double quotation marks.
Since a newline is considered to be whitespace, a list of GLOBs in a
|
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
This has some consequences.
The simplest GLOB pattern is just a bare name of a file named with the
usual assortment of allowed file name characters. Such a pattern
matches that one file: the GLOB `README` matches only a file named
`README` in the root of the tree. The GLOB `*/README` would match a
file named `README` anywhere except the root, since the glob requires
that at least one '/' be in the name. (Recall that `/` matches the
directory separator regardless of whether it is `/` or `\` on your
system.)
## Where are they used
|
|
|
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
This has some consequences.
The simplest GLOB pattern is just a bare name of a file named with the
usual assortment of allowed file name characters. Such a pattern
matches that one file: the GLOB `README` matches only a file named
`README` in the root of the tree. The GLOB `*/README` would match a
file named `README` anywhere except the root, since the glob requires
that at least one `/` be in the name. (Recall that `/` matches the
directory separator regardless of whether it is `/` or `\` on your
system.)
## Where are they used
|