* Discover embedded repos hidden by `repoDir`'s OWN gitignore rules: for each * gitignored directory, search for nested `.git` roots. Returns repo paths * relative to `repoDir`, trailing-slashed. * * OPT-IN ONLY. Walking into a gitignored directory contradicts what every other * tool (and CodeG
(repoDir: string, includeIgnored: Ignore | null, prefix: string)
| 628 | * default excludes (`node_modules`, …) are always skipped. |
| 629 | */ |
| 630 | function findIgnoredEmbeddedRepos(repoDir: string, includeIgnored: Ignore | null, prefix: string): string[] { |
| 631 | if (!includeIgnored) return []; |
| 632 | const defaults = defaultsOnlyIgnore(); |
| 633 | const repos: string[] = []; |
| 634 | for (const dir of listIgnoredDirs(repoDir)) { |
| 635 | if (defaults.ignores(dir)) continue; |
| 636 | if (!includeIgnored.ignores(normalizePath(prefix + dir))) continue; |
| 637 | repos.push(...findNestedGitRepos(path.join(repoDir, dir), dir)); |
| 638 | } |
| 639 | return repos; |
| 640 | } |
| 641 | |
| 642 | /** |
| 643 | * Collect git-visible files (tracked + untracked, .gitignore-respected) from the |
no test coverage detected