(fields: string[])
| 15 | } |
| 16 | |
| 17 | function parseCommitEntry(fields: string[]): ProjectCommitEntry | null { |
| 18 | const [sha, shortSha, authorName, authorEmail, authoredAt, committedAt, rawDecorations, subject] = |
| 19 | fields |
| 20 | |
| 21 | if (!(sha && shortSha)) { |
| 22 | return null |
| 23 | } |
| 24 | |
| 25 | const decorations = parseDecorations(rawDecorations ?? '') |
| 26 | |
| 27 | return { |
| 28 | sha, |
| 29 | shortSha, |
| 30 | subject: subject ?? '', |
| 31 | authorName: authorName ?? '', |
| 32 | authorEmail: authorEmail ?? '', |
| 33 | authoredAt: authoredAt ?? '', |
| 34 | committedAt: committedAt ?? '', |
| 35 | decorations, |
| 36 | isHead: headDecorationPattern.test(rawDecorations ?? ''), |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | function parseCommitEntries(output: string) { |
| 41 | return output |
no test coverage detected