Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/extraction/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,21 @@ function getGitVisibleFiles(rootDir: string): Set<string> | null {
// Git, but still wanted in the graph.)
for (const f of collectIncludedFilesForRoot(rootDir)) visible.add(f);
return visible;
} catch {
} catch (error) {
// Any failure here (git missing, a `git rev-parse`/`ls-files` timeout or
// buffer overrun under load, an unreadable repo, etc.) silently sent every
// caller to the `scanDirectoryWalk` filesystem-walk fallback with zero
// signal that the fast, fully git-delegated path was skipped — making a
// report like "the index walked into a nested-.gitignore-excluded
// directory" nearly untriageable, since there was no way to tell which of
// the two independent ignore implementations actually ran. Log it (gated
// by the project's existing CODEGRAPH_DEBUG convention, see logDebug) so a
// future report at this scale can confirm or rule out the fallback path
// in one step instead of re-instrumenting the source to find out.
logDebug('git-based file listing unavailable — falling back to filesystem walk', {
rootDir,
error: error instanceof Error ? error.message : String(error),
});
return null;
}
}
Expand Down