(ref: string, relPath: string)
| 81 | } |
| 82 | |
| 83 | async function getFileAtRef(ref: string, relPath: string): Promise<string | null> { |
| 84 | try { |
| 85 | const { stdout } = await exec("git", ["show", `${ref}:${relPath}`], { maxBuffer: 10 * 1024 * 1024 }); |
| 86 | return stdout; |
| 87 | } catch { |
| 88 | return null; |
| 89 | } |
| 90 | } |