MCPcopy Create free account
hub / github.com/ReviewStage/stage-cli / readRepoRoot

Function readRepoRoot

packages/cli/src/git.ts:30–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28 const root = readRepoRoot();
29 return { root, originUrl: readOriginUrl(root), headRef: readHeadRef(root) };
30}
31
32export function readRepoRoot(): string {
33 try {
34 return execFileSync("git", ["rev-parse", "--show-toplevel"], {
35 encoding: "utf8",
36 stdio: ["ignore", "pipe", "ignore"],
37 }).trim();
38 } catch {
39 throw new NotInGitRepoError();
40 }
41}
42

Callers 6

readRepoContextFunction · 0.85
runPrepFunction · 0.85
assembleChaptersFileFunction · 0.85
resolveViewerFunction · 0.85
getDbPathFunction · 0.85
path.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected