MCPcopy Create free account
hub / github.com/IgorWarzocha/howcode / parseCommitEntry

Function parseCommitEntry

desktop/project-git/project-commits.ts:17–38  ·  view source on GitHub ↗
(fields: string[])

Source from the content-addressed store, hash-verified

15}
16
17function 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
40function parseCommitEntries(output: string) {
41 return output

Callers 1

parseCommitEntriesFunction · 0.85

Calls 1

parseDecorationsFunction · 0.85

Tested by

no test coverage detected