Diff
The process of detecting and displaying differences between two texts. Foundation technology for version control and code review.
Diff is the process of comparing two text files or data sets to detect and display added, deleted, and modified portions. Originating from the Unix diff command, it is widely used as foundation technology for version control systems.
Git uses diff algorithms to detect changes between commits. In unified diff format, added lines are marked with + and deleted lines with -. Git practical guides cover diff usage extensively.
Notable diff algorithms include Myers' algorithm (minimum edit distance) and patience diff (prioritizing meaningful line matching).
From a character count perspective, diff output includes metadata (line numbers, change markers) in addition to original text, so diff output character count exceeds the original text. Text algorithms books provide additional context.