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

Function getProjectCommitEntry

desktop/project-git/project-commits.ts:77–96  ·  view source on GitHub ↗
(
  projectId: string,
  rev: string,
)

Source from the content-addressed store, hash-verified

75}
76
77export async function getProjectCommitEntry(
78 projectId: string,
79 rev: string,
80): Promise<ProjectCommitEntry | null> {
81 const resolvedRev = await resolveCommitRevision(projectId, rev)
82 if (!resolvedRev) {
83 return null
84 }
85
86 const { stdout } = await runGitWithOptions(
87 projectId,
88 ['show', '--no-patch', '--decorate=short', `--format=${COMMIT_PRETTY_FORMAT}`, resolvedRev],
89 {
90 timeout: 10_000,
91 maxBuffer: 1024 * 512,
92 },
93 )
94
95 return parseCommitEntries(stdout)[0] ?? null
96}
97
98export async function listProjectCommits(
99 projectId: string,

Callers 5

resolveHeadBaselineFunction · 0.90
resolveYesterdayBaselineFunction · 0.90

Calls 3

runGitWithOptionsFunction · 0.90
resolveCommitRevisionFunction · 0.85
parseCommitEntriesFunction · 0.85

Tested by

no test coverage detected