I understand that //depot/foo/...
will map all the files and folders under //depot/foo/
. So, what does //depot/foo/*
do? I was told not to use it, and would like to understand why.
...
recurses, *
does not. If you want to match all files at a given location and all files below that location, you use ...
; if you want to match only files in a given folder, use *
.
With your example
//depot/foo/*
will only match files
in the 'foo' folder (if there are
any)//depot/foo/...
will match files
in the foo folder as well as any
files beneath fooFor simple client specs, you want to use ...
so that you get all files in all subdirectories in a depot. You might use the *
character in a clientspec when you want to match files in a specific folder and nothing underneath. As an example
//depot/foo/... //myclient/depot/foo/...
-//depot/foo/test/... //myclient/depot/foo/test/...
//depot/foo/test/* //myclient/depot/foo/test/*
The above will (in order), add all files in the //depot/foo location. Then it will remove everything in //depot/foo/test (including files in the test folder). The third line will then add back in just the files in the test folder and nothing underneath.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With