Skip to content

parseDiff

parseDiff(text): IDiff

The new-side line ranges of a git diff -U0 (prefixes a/ and b/, paths unquoted: run.ts asks git for exactly that). The lines of a hunk are counted off, so an added line that happens to read +++ b/x is not taken for a file header. Throws on a path git had to quote, rather than guess at it.

string

IDiff