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

Gitignore + explorerignore implementation (#15, v2.1.4). More...

#include <entropic/mcp/servers/ignore_matcher.h>
#include <entropic/types/logging.h>
#include <fstream>
#include <sstream>
Include dependency graph for ignore_matcher.cpp:

Go to the source code of this file.

Namespaces

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

Variables

static auto logger = entropic::log::get("mcp.filesystem.ignore")
 

Detailed Description

Gitignore + explorerignore implementation (#15, v2.1.4).

Pattern compilation is the only non-trivial part. Each gitignore line becomes a Rule whose regex source matches against the path relative to the rule's anchor base, in forward-slash form.

Conversion rules (gitignore body → regex source):

  • ** (between separators) → .*
  • *[^/]* (does not cross /)
  • ?[^/]
  • [abc] → preserved verbatim
  • \X → escaped literal X
  • other regex metacharacters are escaped

Anchoring:

  • Pattern starts with / OR contains / (anywhere except trailing) → regex anchored at the rule's base
  • Otherwise → matches against any path component (regex prefixed with (?:.*\/)?)
Version
2.1.4

Definition in file ignore_matcher.cpp.

Variable Documentation

◆ logger

auto logger = entropic::log::get("mcp.filesystem.ignore")
static

Definition at line 34 of file ignore_matcher.cpp.