pub fn compile_exclude(patterns: &[String]) -> Result<ExcludeMatcher, String>Expand description
What:
Compile patterns in order.
Result<ExcludeMatcher, String> is the matcher or
the reason a pattern was refused,
naming it.
Why:
A pattern that cannot compile must not silently match nothing.
The empty root
keeps candidate paths as Git prints them:
relative to the top level.
In TS you’d write (pseudocode):
function compileExclude(patterns: string[]): ExcludeMatcher;