Skip to content

listReposPathForReal

listReposPathForReal(realDir, repoRoot): string

Defined in: src/repos.ts:83

Map a realpath-resolved repo dir (e.g. from safeRepoDir, which follows symlinks) back to the path form listRepos enumerates — the raw join(repoRoot, name). That raw form is the key the backlog counts cache and buildBacklogPayload read by, so a caller holding the realpath (the merge path) must reconcile to it or it writes/reads a different cache key under a symlinked repoRoot/repo — silently operating on a phantom entry.

Matches by realpath-comparing each enumerated repo against realDir. Returns realDir unchanged when nothing matches (e.g. a repo outside repoRoot), so the caller still refreshes a sane key rather than dropping the request.

string

string

string