MCPcopy Create free account
hub / github.com/arctic-cli/interface / diffFiles

Function diffFiles

packages/arctic/src/snapshot/index.ts:311–319  ·  view source on GitHub ↗
(patch: string)

Source from the content-addressed store, hash-verified

309 }
310
311 export function diffFiles(patch: string): string[] {
312 const files: string[] = []
313 for (const line of patch.split("\n")) {
314 if (!line.startsWith("diff --git ")) continue
315 const match = line.match(/^diff --git a\/(.+?) b\/(.+)$/)
316 if (match?.[2]) files.push(match[2])
317 }
318 return files
319 }
320
321 export function filterPatch(patch: string, options: { exclude: Set<string> }): string {
322 if (!patch.trim()) return ""

Callers

nothing calls this directly

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected