Git patch change summary

Check text Git patch hunk lengths and count added and removed lines. The patch is never applied; binary patches and complex path encoding are rejected.

The example value has been entered. Check it immediately or change the value.

Input is processed in the browser. Refreshing returns a sample value.

Result

Instructions and example

Consume old/new hunk counts using context, deletion and addition lines; require both counts to finish exactly.

The default patch changes old to new in 1 file and 1 hunk, yielding +1 / -1.

Supports ordinary text diffs with whitespace-free a/ and b/ paths. Rename-only, combined, binary and actual applicability checks are excluded.

Frequently asked questions

Are context lines counted as added patch lines?

No. Context consumes both hunk lengths but is not included in additions or deletions.

What happens when patch hunk counts disagree?

The input is rejected as a truncated patch or inconsistent header.

Calculation criteria and reference materials

Verification of calculation criteria: · Calculation·verification principles · Report errors