* The nested git repository `projectPath` lives in when the index the * up-walk reached (`indexRoot`'s, open as `cg`) holds none of its files; null * when that index covers it — an ordinary subdirectory, a submodule or * embedded clone the ancestor indexes, a linked worktree (#155) — or whe
(projectPath: string, indexRoot: string, cg: CodeGraph)
| 2595 | * index is honored without a restart. |
| 2596 | */ |
| 2597 | private uncoveredNestedRepo(projectPath: string, indexRoot: string, cg: CodeGraph): NestedRepository | null { |
| 2598 | const cacheKey = `${projectPath}\u0000${indexRoot}`; |
| 2599 | let nested = this.nestedRepoCache.get(cacheKey); |
| 2600 | if (nested === undefined) { |
| 2601 | nested = nestedRepositoryBelow(projectPath, indexRoot); |
| 2602 | this.nestedRepoCache.set(cacheKey, nested); |
| 2603 | } |
| 2604 | if (!nested) return null; |
| 2605 | try { |
| 2606 | return cg.hasFilesUnder(nested.relPath) ? null : nested; |
| 2607 | } catch { |
| 2608 | // An index we can't read is no evidence the repository is excluded. |
| 2609 | return null; |
| 2610 | } |
| 2611 | } |
| 2612 | |
| 2613 | /** |
| 2614 | * Wait for a project to finish rebuilding, off this thread, the secondary |
no test coverage detected