Skip to main content

build_matcher

Function build_matcher 

Source
pub fn build_matcher(patterns: &[String]) -> Gitignore
Expand description

Build a Gitignore matcher from the given pattern strings, translating the root-admin special cases (.heddle, .heddleignore, .git) into root-anchored gitignore syntax. Compile patterns with heddle’s root-admin special cases applied. Shared by this crate’s one-shot matcher and repo’s compiled-once walker matcher so both sides can never drift on ignore semantics.