MCPcopy Create free account
hub / github.com/Tencent/teamai-cli / gitCommit

Function gitCommit

src/wiki-engine/code-knowledge/code-collector.ts:146–153  ·  view source on GitHub ↗
(root: string)

Source from the content-addressed store, hash-verified

144}
145
146export async function gitCommit(root: string): Promise<string | undefined> {
147 try {
148 const { stdout } = await execFileAsync("git", ["-C", root, "rev-parse", "HEAD"]);
149 return stdout.trim() || undefined;
150 } catch {
151 return undefined;
152 }
153}
154
155/**
156 * Report whether the git working tree at root is clean (no staged, unstaged,

Callers 2

collectCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected