Reading a text diff: changed lines are not changed meaning
When reviewing revised text or settings, seeing the differences saves rereading both versions from scratch. A line comparison directs your attention; it does not decide whether the revision is correct.
Establish the comparison direction
Compare the earlier version with the later one. In unified output, − marks a line removed from the earlier text and + marks a line added to the later text. Reversing the inputs reverses their meaning.
Unchanged lines provide context. Read around each change: a small deletion can matter even when the total number of changed lines is low.
References: GNU Diffutils — Reading unified differences
A replacement can count as removal plus addition
Changing one word can show the entire old line as removed and the replacement as added. That does not mean two independent paragraphs were rewritten.
Moving a line can also appear as removal and addition. This comparison does not classify moves or grammar corrections, and does not calculate semantic similarity.
Whitespace and the final newline still matter
The tool compares lines exactly after normalizing CRLF and CR separators to LF. Spaces within a line or at its end still affect the comparison.
A final newline is distinguished from its absence. Do not judge the quality of a revision from counts alone, or clean both inputs first if detecting such differences is the purpose.
Example: revise a time and add a location detail
The earlier version has “Time: 9” and “Room: A”. The later one has “Time: 10”, “Room: A”, and “Floor: 2”, with every line newline-terminated. The result is one removed line, two added lines and one unchanged line.
Those counts describe the representation, not the number of decisions: a time changed and a floor was added. Review both in context, then confirm the real appointment details separately; a diff reveals differences, not factual correctness.