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