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

Function generateDiff

src/eval.ts:224–238  ·  view source on GitHub ↗
(baselineCommit: string)

Source from the content-addressed store, hash-verified

222 }
223
224 async function generateDiff(baselineCommit: string) {
225 let diff;
226 try {
227 diff = (
228 await $`git diff --unified=5 ${baselineCommit} HEAD`.text()
229 ).trim();
230 } catch (e) {
231 const msg = e instanceof Error ? e.message : String(e);
232 console.error("Failed to generate diff:", msg);
233 throw e;
234 }
235
236 if (diff.length === 0) throw new Error("Diff is empty");
237 return diff;
238 }
239
240 async function judgeScore(
241 criterionName: string,

Callers 1

runOnceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected