()
| 164 | } |
| 165 | |
| 166 | const createShallowClone = async () => { |
| 167 | const cloneDir = await fs.promises.mkdtemp( |
| 168 | path.join(os.tmpdir(), 'base-deep-clone-'), |
| 169 | ) |
| 170 | const repoUrl = `file://${repoRoot}` |
| 171 | await $`git clone --depth 1 --no-tags ${repoUrl} ${cloneDir}`.quiet() |
| 172 | return cloneDir |
| 173 | } |
| 174 | |
| 175 | const getDiffLineStats = async (cwd: string) => { |
| 176 | const output = await $`git diff --numstat`.cwd(cwd).text() |