Expand description
What git says about a fix, parsed (regress.rs runs git): --numstat -z sizes, -U0 hunks, and
blame --porcelain per line. No git here, so every rule is a unit test.
Only lines a fix removed or changed count: a pure addition blames nobody, and lock, snapshot and
generated files record no decision. Reflows, renames and moves: regress_cosmetic.rs.
Structs§
- Hunk
- One
-U0hunk: lines removed at the parent (with their line numbers there) and lines added.
Functions§
- blame_
lines - The commit behind each line of
git blame --porcelainoutput, with the line’s number at the blamed revision; lines of aboundarycommit (a shallow graft, a range start) and uncommitted lines are left out. - generated
- Lock files, vendored builds, snapshots and generated code: their lines record no decision.
- generated_
by_ attr - The paths
git check-attr -z linguist-generated diffmarks generated (linguist-generatedset, or-diff). - hunks
- The hunks of
git diff -U0 --src-prefix=a/ --dst-prefix=b/output. A hunk whose path could not be read has an empty one. - ranges
- Sorted line numbers as inclusive ranges.
- removed_
by_ path - The removed lines of
hunksper path, paths in hunk order. - size
- Files and changed lines of
git diff --numstat -z -M, binary and generated files left out.