View Source CoverDiff.Diff (CoverDiff v0.1.1)
Parses a diff into a list of additions and context, excluding deletions. For simplicity, the diff will be generated with the --no-prefix option (meaning there will be no "a/" and "b/" prefixes before file paths.)
Summary
Functions
Runs the git diff command and parses the result.
Parses a diff in string format into a list of changes per file, taking only added or context lines (not deletions).
Functions
Runs the git diff command and parses the result.
@spec parse(diff :: String.t()) :: [ %{ required(filename :: String.t()) => [ {line_number :: integer(), type :: :context | :add, text :: String.t()} ] } ]
Parses a diff in string format into a list of changes per file, taking only added or context lines (not deletions).