MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / mainCheckoutRoot

Function mainCheckoutRoot

scripts/codex-worktree-cache.mjs:279–294  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

277}
278
279function mainCheckoutRoot() {
280 const result = spawnSync(
281 "git",
282 ["rev-parse", "--path-format=absolute", "--git-common-dir"],
283 { cwd: ROOT, encoding: "utf8" },
284 );
285 if (result.status !== 0) {
286 return null;
287 }
288
289 const gitCommonDir = result.stdout.trim();
290 if (basename(gitCommonDir) !== ".git") {
291 return null;
292 }
293 return dirname(gitCommonDir);
294}
295
296function hashFiles(paths) {
297 const hash = createHash("sha256");

Callers 1

cacheSourceRootsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected