You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual behavior: When indexing a repository, the tool reads only per-directory .gitignore files committed inside the repo. The global exclude file referenced by git config core.excludesFile (e.g. ~/.gitignore_global on macOS/Linux, %USERPROFILE%\.gitignore_global on Windows) is silently ignored.
Files the user has told git to exclude globally — .DS_Store, Thumbs.db, .idea/, *.pyc, __pycache__/, IDE config directories — are fully indexed and appear in the knowledge graph.
Expected behavior: The indexer should honour all three layers of git's --exclude-standard exclude chain:
Index the repo: codebase-memory-mcp index_repository '{"project":"/tmp/testrepo"}'
Query for the excluded file: codebase-memory-mcp cli search_graph '{"project":"/tmp/testrepo","name_pattern":"foo.pyc"}'
Expected: no results — foo.pyc should be excluded by the global gitignore. Actual:foo.pyc appears as a graph node — core.excludesFile was not consulted.
Cross-check:git -C /tmp/testrepo ls-files --exclude-standard --others returns nothing for foo.pyc, confirming git itself respects the global exclude file at all three layers.
Logs
Project scale (if relevant)
No response
Confirmations
I searched existing issues and this is not a duplicate.
My reproduction uses shareable code (a dummy snippet or a public OSS repository), not proprietary code.
Version
latest (main, as of 2026-06-18)
Platform
macOS (Apple Silicon)
Install channel
GitHub release archive / install.sh / install.ps1
Binary variant
standard
What happened, and what did you expect?
Actual behavior: When indexing a repository, the tool reads only per-directory
.gitignorefiles committed inside the repo. The global exclude file referenced bygit config core.excludesFile(e.g.~/.gitignore_globalon macOS/Linux,%USERPROFILE%\.gitignore_globalon Windows) is silently ignored.Files the user has told git to exclude globally —
.DS_Store,Thumbs.db,.idea/,*.pyc,__pycache__/, IDE config directories — are fully indexed and appear in the knowledge graph.Expected behavior: The indexer should honour all three layers of git's
--exclude-standardexclude chain:.gitignorefiles ✓ (works today)$GIT_DIR/info/exclude(tracked separately in index_repository ignores .git/info/exclude (only .gitignore honored) → indexes excluded worktrees → OOM #489)core.excludesFile(this issue — currently unhandled)git ls-files --exclude-standardalready reads all three layers; the indexer's tree walk should match that behaviour.Reproduction
Configure a global gitignore and add a pattern:
Create a minimal test repo with a
.pycfile not listed in any in-repo.gitignore:Index the repo:
codebase-memory-mcp index_repository '{"project":"/tmp/testrepo"}'Query for the excluded file:
codebase-memory-mcp cli search_graph '{"project":"/tmp/testrepo","name_pattern":"foo.pyc"}'Expected: no results —
foo.pycshould be excluded by the global gitignore.Actual:
foo.pycappears as a graph node —core.excludesFilewas not consulted.Cross-check:
git -C /tmp/testrepo ls-files --exclude-standard --othersreturns nothing forfoo.pyc, confirming git itself respects the global exclude file at all three layers.Logs
Project scale (if relevant)
No response
Confirmations