(options?: {
ignoreUntracked?: boolean
})
| 369 | } |
| 370 | |
| 371 | export const getIsClean = async (options?: { |
| 372 | ignoreUntracked?: boolean |
| 373 | }): Promise<boolean> => { |
| 374 | const args = ['--no-optional-locks', 'status', '--porcelain'] |
| 375 | if (options?.ignoreUntracked) { |
| 376 | args.push('-uno') |
| 377 | } |
| 378 | const { stdout } = await execFileNoThrow(gitExe(), args, { |
| 379 | preserveOutputOnError: false, |
| 380 | }) |
| 381 | return stdout.trim().length === 0 |
| 382 | } |
| 383 | |
| 384 | export const getChangedFiles = async (): Promise<string[]> => { |
| 385 | const { stdout } = await execFileNoThrow( |
no test coverage detected