78 void load(
const std::filesystem::path& root);
89 const std::filesystem::path& base = {});
145 static Rule compile_pattern(
const std::string& pattern,
146 const std::string& base);
159 static std::string pattern_to_regex(
const std::string& pattern);
168 void load_file(
const std::filesystem::path& path,
169 const std::string& base);
182 void load_nested_gitignores(
const std::filesystem::path& canonical_root,
183 const std::filesystem::path& root_gi);
185 std::vector<Rule> rules_;
gitignore-style path matcher (#15, v2.1.4).
void load(const std::filesystem::path &root)
Load gitignore + explorerignore from a workspace root.
void add_pattern(const std::string &pattern, const std::filesystem::path &base={})
Add a single pattern programmatically (test surface).
bool is_ignored(const std::string &rel_path, bool is_dir) const
Test whether a path is ignored.
IgnoreMatcher()=default
Construct an empty matcher (no rules).
std::size_t rule_count() const
Number of compiled rules (test surface).
Activate model on GPU (WARM → ACTIVE).
One compiled gitignore rule (public so internal helpers in the .cpp can construct Rules without frien...
std::regex re_under
Path is strictly below target.
std::string base
Anchor base, "" means root.
bool dir_only
Trailing / (directory match)
std::string original
Raw pattern for diagnostics.
std::regex re_exact
Path equals pattern target.