MCPcopy Create free account
hub / github.com/backnotprop/plannotator / extractChangedFiles

Function extractChangedFiles

packages/shared/code-nav.ts:320–330  ·  view source on GitHub ↗
(patch: string | null)

Source from the content-addressed store, hash-verified

318// ---------------------------------------------------------------------------
319
320export function extractChangedFiles(patch: string | null): string[] {
321 if (!patch) return [];
322 const set = new Set<string>();
323 const re = /^diff --git a\/(.+?) b\/(.+)$/gm;
324 let m: RegExpExecArray | null;
325 while ((m = re.exec(patch)) !== null) {
326 set.add(m[1]);
327 set.add(m[2]);
328 }
329 return [...set];
330}
331
332// ---------------------------------------------------------------------------
333// Validation

Callers 3

code-nav.test.tsFile · 0.90
fetchFunction · 0.90
startReviewServerFunction · 0.85

Calls 1

addMethod · 0.80

Tested by

no test coverage detected