MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / parseCommit

Function parseCommit

packages/plugins/apps/src/git-client/packfile.ts:554–559  ·  view source on GitHub ↗
(data: Uint8Array)

Source from the content-addressed store, hash-verified

552}
553
554function parseCommit(data: Uint8Array): { tree: string } {
555 const text = td.decode(data);
556 const m = text.match(/^tree ([0-9a-f]{40})/m);
557 if (!m) throw new PackParseError("commit has no tree");
558 return { tree: m[1] };
559}
560
561// Parse a tree object: entries of "mode<space>name\0<20-byte sha>"
562function parseTree(data: Uint8Array): { mode: string; name: string; sha: string }[] {

Callers 1

walkTreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected