Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
ignore_matcher.h File Reference

Path-relative ignore matching honoring .gitignore + .explorerignore. More...

#include <filesystem>
#include <regex>
#include <string>
#include <vector>
Include dependency graph for ignore_matcher.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  entropic::IgnoreMatcher
 gitignore-style path matcher (#15, v2.1.4). More...
 
struct  entropic::IgnoreMatcher::Rule
 One compiled gitignore rule (public so internal helpers in the .cpp can construct Rules without friend declarations). More...
 

Namespaces

namespace  entropic
 Activate model on GPU (WARM → ACTIVE).
 

Detailed Description

Path-relative ignore matching honoring .gitignore + .explorerignore.

Issue #15 (v2.1.4): the filesystem MCP server pre-2.1.4 hardcoded a tiny SKIP_DIRS list (.git, node_modules, __pycache__, .venv). Anything else (build artifacts, doxygen output, generated XML, large vendor blobs) leaked through grep/glob/read results, drowning real matches in noise.

IgnoreMatcher loads gitignore-style patterns from two sources:

  1. .gitignore files — discovered recursively. Each file's rules are anchored at that file's directory (so build/ in <root>/sub/.gitignore matches <root>/sub/build/... only, matching git's documented behavior).
  2. .explorerignore (workspace root only) — supplementary, applied after gitignore (so it can both add and re-include via !).

Supported gitignore syntax:

  • Filename globs: \*.log, ?.tmp, [abc].py
  • Directory match: build/ (trailing slash means directory only)
  • Path-anchored: /foo (root-anchored), foo/bar (path contains /)
  • Recursive: leading double-star matches any depth; trailing double-star is recursive descent
  • Negation: !keep.log (re-include after a broader exclude)
  • Comments: # ...
  • Blank lines skipped

Matching is path-relative to root (forward-slash form), never filename-only — build/foo.o correctly matches build/.

Version
2.1.4

Definition in file ignore_matcher.h.