(line: string)
| 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 { |
no test coverage detected