Skip to main content

allowed

Function allowed 

Source
pub fn allowed(entry: &str, patterns: &[String]) -> bool
Expand description

Whether an ignored entry (as git ls-files -o -i --directory prints it: directories end in /) is covered by an allow-list pattern.

A pattern ending in / names a directory, anywhere in the tree (__pycache__/ matches pkg/__pycache__/). Any other pattern names a file by basename, with * as the only wildcard (*.log).