MCPcopy Create free account
hub / github.com/anomalyco/opencode-bench / cloneRepositoryAtCommit

Function cloneRepositoryAtCommit

src/eval.ts:372–378  ·  view source on GitHub ↗
(repo: string, commitSha: string)

Source from the content-addressed store, hash-verified

370 }
371
372 async function cloneRepositoryAtCommit(repo: string, commitSha: string) {
373 await $`git init`.quiet();
374 await $`git remote add origin https://github.com/${repo}.git`.quiet();
375 await $`git fetch --depth 1 origin ${commitSha}`.quiet();
376 await $`git checkout --detach FETCH_HEAD`.quiet();
377 await $`git reset --hard FETCH_HEAD`.quiet();
378 }
379
380 async function cleanupRepository(
381 cwd: string,

Callers 1

runOnceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected