Files
codegraph/__tests__
Max Hsu 27c149524d fix(extraction): keep the git-aware scan working on git older than 2.36
`git ls-files -s --recurse-submodules` dies before git 2.36: builtin/ls-files.c listed show_stage among the modes it rejects, and the check never looks at whether the repo has submodules, so every call fails on Ubuntu 22.04 LTS (2.34.1), Debian 11 (2.30.2) and older.

The throw escaped to getGitVisibleFiles' catch, which returns null and drops the caller into the plain filesystem walk. That walk knows nothing of includeIgnored, gitlink recursion, or the codegraph.json include allowlist, so all three silently stopped applying and files vanished from the index with no error.

Retry without --recurse-submodules rather than without -s: the mode bits are what gitlink detection reads, and embedded repos are reached through that recursion anyway. A PATH shim makes the regression testable on any git version.

Co-authored-by: newshowardz777 <newshowardz777@users.noreply.github.com>
2026-09-08 22:41:56 +08:00
..