Skip to content

Commit 8386cee

Browse files
committed
Evals: Get all changes since commit start
1 parent 0942664 commit 8386cee

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

evals/git-evals/run-git-evals.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,9 @@ function getCodebuffFileStates(
273273
evalCommitSha: string,
274274
projectPath: string,
275275
): string {
276-
// Stage all changes (including new files) before generating diff
277-
execFileSync('git', ['add', '.'], {
278-
cwd: projectPath,
279-
stdio: ['ignore', 'pipe', 'pipe'],
280-
})
281-
282-
// Get diff of staged files to include new files
283-
return execFileSync('git', ['diff', '--staged'], {
276+
// Get all changes since the commit before the target commit
277+
// This captures both uncommitted changes and any commits made during the eval
278+
return execFileSync('git', ['diff', `${evalCommitSha}^`], {
284279
cwd: projectPath,
285280
stdio: ['ignore', 'pipe', 'pipe'],
286281
}).toString()

0 commit comments

Comments
 (0)