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

Function resolveHeadBaseline

desktop/project-git/project-diff-baselines.ts:126–142  ·  view source on GitHub ↗
(projectId: string)

Source from the content-addressed store, hash-verified

124}
125
126async function resolveHeadBaseline(projectId: string): Promise<ProjectDiffResolvedBaseline> {
127 const entry = await getProjectCommitEntry(projectId, 'HEAD')
128 if (!entry) {
129 return {
130 kind: 'head',
131 rev: EMPTY_TREE_OID,
132 label: 'Initial state',
133 commitSha: null,
134 shortSha: null,
135 subject: null,
136 committedAt: null,
137 capturedAt: null,
138 }
139 }
140
141 return toResolvedCommitBaseline('head', entry)
142}
143
144async function resolvePreviousCommitBaseline(
145 projectId: string,

Callers 2

Calls 2

getProjectCommitEntryFunction · 0.90
toResolvedCommitBaselineFunction · 0.85

Tested by

no test coverage detected