()
| 369 | } |
| 370 | |
| 371 | export const getChangedFiles = async (): Promise<string[]> => { |
| 372 | const { stdout } = await execFileNoThrow( |
| 373 | gitExe(), |
| 374 | ['--no-optional-locks', 'status', '--porcelain'], |
| 375 | { |
| 376 | preserveOutputOnError: false, |
| 377 | }, |
| 378 | ) |
| 379 | return stdout |
| 380 | .trim() |
| 381 | .split('\n') |
| 382 | .map(line => line.trim().split(' ', 2)[1]?.trim()) // Remove status prefix (e.g., "M ", "A ", "??") |
| 383 | .filter(line => typeof line === 'string') // Remove empty entries |
| 384 | } |
| 385 | |
| 386 | export type GitFileStatus = { |
| 387 | tracked: string[] |
nothing calls this directly
no test coverage detected