Problem
When an Obsidian vault lives inside a git repository, engraph's index command silently skips directories listed in .gitignore. This is because the Rust ignore crate's standard_filters(true) in src/indexer.rs respects .gitignore, .ignore, and .git/info/exclude.
For personal knowledge vaults, it's common to gitignore sensitive directories (e.g., brain/, journal/, health/, ops/) while still wanting them fully indexed for semantic search and graph analysis. The current behavior means large portions of the vault are invisible to engraph with no warning or error.
Current behavior
engraph index skips all files in gitignored directories
- No warning is emitted about skipped files
reindex_file works per-file and bypasses the walker (confirmed workaround)
- No config option exists to disable gitignore respect
Proposed solution
One of:
- A config option in
config.toml: respect_gitignore = false (default true for backward compat)
- A CLI flag:
engraph index --no-gitignore
- Both
The fix in code would be straightforward — WalkBuilder::new(path).standard_filters(false) when the option is set, with manual exclusion of .git/ directory.
Workaround
Currently using reindex_file on each gitignored file individually after index runs. This works but requires maintaining a list of files that the walker skips.
Environment
- engraph v1.6.0 (brew)
- macOS 14.4
- Vault: ~200 markdown files, ~50% in gitignored directories
Problem
When an Obsidian vault lives inside a git repository, engraph's
indexcommand silently skips directories listed in.gitignore. This is because the Rustignorecrate'sstandard_filters(true)insrc/indexer.rsrespects.gitignore,.ignore, and.git/info/exclude.For personal knowledge vaults, it's common to gitignore sensitive directories (e.g.,
brain/,journal/,health/,ops/) while still wanting them fully indexed for semantic search and graph analysis. The current behavior means large portions of the vault are invisible to engraph with no warning or error.Current behavior
engraph indexskips all files in gitignored directoriesreindex_fileworks per-file and bypasses the walker (confirmed workaround)Proposed solution
One of:
config.toml:respect_gitignore = false(defaulttruefor backward compat)engraph index --no-gitignoreThe fix in code would be straightforward —
WalkBuilder::new(path).standard_filters(false)when the option is set, with manual exclusion of.git/directory.Workaround
Currently using
reindex_fileon each gitignored file individually afterindexruns. This works but requires maintaining a list of files that the walker skips.Environment