mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-10-28 07:03:20 +08:00
A .cbmignore negation pattern (e.g. "!obj/") whose rule is the last match for a directory now un-skips built-in skip-list dirs, so projects can index sources that live under names like obj/, target/, or docs/ (issue #500). Distills the design and test intents of PR #543 onto the current 3-state cbm_gitignore_match_result API: instead of a second inverted-polarity matcher, should_skip_directory consults the existing last-match-wins result (<0 = negated) inside the built-in branch and falls through so .gitignore/global/local rules still apply. Non-negatable safety core: .git, node_modules, and the worktree-internal dirs (.worktrees, .claude-worktrees) can never be un-skipped — a repo-committed .cbmignore must not defeat OOM/safety skips (#489, #802). Un-skipped dirs are walked normally and therefore no longer appear in the excluded-subtree list (#411 coherence). Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>