( repoPath: string, commitSha: string, filePath: string, )
| 16 | import type { EvalDataV2, EvalCommitV2, FileDiff } from './types' |
| 17 | |
| 18 | function getFileContentAtCommit( |
| 19 | repoPath: string, |
| 20 | commitSha: string, |
| 21 | filePath: string, |
| 22 | ): string { |
| 23 | try { |
| 24 | return execSync(`git show ${commitSha}:${JSON.stringify(filePath)}`, { |
| 25 | cwd: repoPath, |
| 26 | encoding: 'utf-8', |
| 27 | }) |
| 28 | } catch (error) { |
| 29 | return '' |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | async function extractFileDiffsFromCommit( |
| 34 | repoPath: string, |
no outgoing calls
no test coverage detected