pub fn may_apply(pattern: &[u8], base: &[u8], path: &[u8]) -> boolExpand description
What:
Whether the pattern of an attributes line in the directory base may apply to the file path; a spelling the matcher
does not model (a quote, an escape, a bracket class, **, a trailing slash), or whose comparison would exceed the work
budget, answers yes.
Why:
Answering yes refuses a file that Git might not have matched; answering no for a file it matches would accept one.
In TS you’d write (pseudocode):
function mayApply(pattern: Buffer, base: Buffer, path: Buffer): boolean;