* Whether an embedded repo found as a tracked gitlink (mode 160000, #1031/#1033) * must be SKIPPED rather than indexed. A gitlink is tracked, so `.gitignore` * can't untrack it — but the discovery passes for it must still honor the same * scope rules as every other path, or a gitignored reference
( relDir: string, prefix: string, defaults: Ignore, repoIgnore: Ignore, includeIgnored: Ignore | null, )
| 726 | * both passed in so they're built once per repo level rather than per gitlink. |
| 727 | */ |
| 728 | function gitlinkEmbeddedRepoSkipped( |
| 729 | relDir: string, |
| 730 | prefix: string, |
| 731 | defaults: Ignore, |
| 732 | repoIgnore: Ignore, |
| 733 | includeIgnored: Ignore | null, |
| 734 | ): boolean { |
| 735 | if (defaults.ignores(relDir)) return true; // default-ignored — never index, opt-in can't revive |
| 736 | if (!repoIgnore.ignores(relDir)) return false; // not ignored at all — index as before (#1031/#1033) |
| 737 | // Gitignored by the repo's own rules — skip unless the project opted it in. |
| 738 | return !includeIgnored?.ignores(normalizePath(prefix + relDir)); |
| 739 | } |
| 740 | |
| 741 | /** |
| 742 | * Standalone discovery of every embedded repo root under `rootDir` (relative, |
no test coverage detected