MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / gitlinkEmbeddedRepoSkipped

Function gitlinkEmbeddedRepoSkipped

src/extraction/index.ts:1172–1183  ·  view source on GitHub ↗

* 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,
)

Source from the content-addressed store, hash-verified

1170 * both passed in so they're built once per repo level rather than per gitlink.
1171 */
1172function gitlinkEmbeddedRepoSkipped(
1173 relDir: string,
1174 prefix: string,
1175 defaults: Ignore,
1176 repoIgnore: Ignore,
1177 includeIgnored: Ignore | null,
1178): boolean {
1179 if (defaults.ignores(relDir)) return true; // default-ignored — never index, opt-in can't revive
1180 if (!repoIgnore.ignores(relDir)) return false; // not ignored at all — index as before (#1031/#1033)
1181 // Gitignored by the repo's own rules — skip unless the project opted it in.
1182 return !includeIgnored?.ignores(normalizePath(prefix + relDir));
1183}
1184
1185/**
1186 * Standalone discovery of every embedded repo root under `rootDir` (relative,

Callers 2

visitFunction · 0.85
collectGitFilesFunction · 0.85

Calls 2

normalizePathFunction · 0.90
ignoresMethod · 0.80

Tested by

no test coverage detected