MCPcopy Create free account
hub / github.com/agent-tower/core / attachNumstat

Function attachNumstat

packages/server/src/routes/git.ts:132–140  ·  view source on GitHub ↗

Merge numstat counts into name-status entries by path.

(
  entries: ChangeEntry[],
  stats: Map<string, { additions: number; deletions: number }>,
)

Source from the content-addressed store, hash-verified

130
131/** Merge numstat counts into name-status entries by path. */
132function attachNumstat(
133 entries: ChangeEntry[],
134 stats: Map<string, { additions: number; deletions: number }>,
135): ChangeEntry[] {
136 return entries.map((entry) => {
137 const stat = stats.get(entry.path);
138 return stat ? { ...entry, additions: stat.additions, deletions: stat.deletions } : entry;
139 });
140}
141
142const workingDirSchema = z
143 .string()

Callers 1

gitRoutesFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected