Skip to main content

Module regress_diff

Module regress_diff 

Source
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 -U0 hunk: lines removed at the parent (with their line numbers there) and lines added.

Functions§

blame_lines
The commit behind each line of git blame --porcelain output, with the line’s number at the blamed revision; lines of a boundary commit (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 diff marks generated (linguist-generated set, 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 hunks per path, paths in hunk order.
size
Files and changed lines of git diff --numstat -z -M, binary and generated files left out.