(output: string)
| 9 | const gitSuffixPattern = /\.git$/i |
| 10 | |
| 11 | function parseShortStat(output: string) { |
| 12 | const insertionsMatch = output.match(shortStatInsertionsPattern) |
| 13 | const deletionsMatch = output.match(shortStatDeletionsPattern) |
| 14 | |
| 15 | return { |
| 16 | insertions: insertionsMatch ? Number.parseInt(insertionsMatch[1] ?? '0', 10) : 0, |
| 17 | deletions: deletionsMatch ? Number.parseInt(deletionsMatch[1] ?? '0', 10) : 0, |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | function parseStatusSummary(output: string) { |
| 22 | let fileCount = 0 |