How the Glob Pattern Filter Works
The tool uses glob patterns to include or exclude files and directories, working similarly to tools like tree
or grep
. Here’s a detailed explanation:
Key Concepts
Section titled “Key Concepts”- Include List (A): A set containing the glob patterns for files and directories you want to include.
- Exclude List (B): A set containing the glob patterns for files and directories you want to exclude.
- Universe (Ω): The set of all files and directories.
When you specify an --exclude
list and/or an --include
list, the following logic applies:
Cases and Logic
Section titled “Cases and Logic”-
No include list, no exclude list
Include everything: -
No include list, with exclude list
Include everything except what matches the exclude list: -
With include list, no exclude list
Include only what matches the include list: -
With include list and exclude list
Include what matches the include list and exclude what matches the exclude list. Handle the intersection based on theinclude_priority
parameter:-
Include priority == true:
-
Include priority != true*:
-
Visual Representation of Case 4
Section titled “Visual Representation of Case 4”Let (A) and (B) overlap. Depending on the priority, the intersection include_priority
parameter.