mirror of
https://github.com/safishamsi/graphify.git
synced 2026-09-05 13:16:16 +00:00
`detect_incremental(root)` always called `detect(root)` without forwarding the `follow_symlinks` kwarg. As a result, corpora that include symlinked sub-trees pointing to directories outside the scan root (e.g. a `state_of_truth/` symlink pointing at `~/.hermes/state_of_truth/`) were visible to a full `detect()` run with `follow_symlinks=True` but invisible to any subsequent `--update` run. The incremental scan would then either report no changes (silently dropping legitimate new files) or repeatedly re-extract a phantom subset, depending on what was reachable without crossing symlinks. Add a keyword-only `follow_symlinks` parameter to `detect_incremental()` and forward it. Default stays `False` for backwards compatibility — only callers that already opt in to symlink following on `detect()` pick up the new behaviour for incremental runs too. Test: a corpus with a symlinked directory is invisible with `follow_symlinks=False`, fully indexed with `follow_symlinks=True`, and correctly reports zero new files on a second incremental scan after the manifest is saved.