MCPcopy Index your code
hub / github.com/kpdecker/jsdiff / isDiffHeader

Function isDiffHeader

src/patch/parse.ts:32–36  ·  view source on GitHub ↗
(line: string)

Source from the content-addressed store, hash-verified

30 // Matches lines that denote the start of a new diff's section in a
31 // multi-file patch: `diff --git ...`, `Index: ...`, or `diff -r ...`.
32 function isDiffHeader(line: string): boolean {
33 return isGitDiffHeader(line)
34 || (/^Index:\s/).test(line)
35 || (/^diff(?: -r \w+)+\s/).test(line);
36 }
37
38 // Matches `--- ...` and `+++ ...` file header lines.
39 function isFileHeader(line: string): boolean {

Callers 1

parseIndexFunction · 0.85

Calls 1

isGitDiffHeaderFunction · 0.85

Tested by

no test coverage detected