MCPcopy Index your code
hub / github.com/Waishnav/devspace / countPatchStats

Function countPatchStats

src/apply-patch.ts:467–475  ·  view source on GitHub ↗
(patch: string)

Source from the content-addressed store, hash-verified

465}
466
467function countPatchStats(patch: string): { additions: number; removals: number } {
468 let additions = 0;
469 let removals = 0;
470 for (const line of patch.split("\n")) {
471 if (line.startsWith("+") && !line.startsWith("+++")) additions += 1;
472 if (line.startsWith("-") && !line.startsWith("---")) removals += 1;
473 }
474 return { additions, removals };
475}

Callers 1

applyPatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected