How Diff Checking Works
In computing, data comparison is the calculation of differences between two sequences of data. This is typically done to show the evolution of a document or codebase.
This tool uses an algorithm (typically the Myers difference algorithm) to find the Longest Common Subsequence (LCS). It then deduces the minimal set of additions and deletions needed to transform the original text into the modified text.
Reading the Output
- Red: Lines or characters that were in the original text but are removed in the new version.
- Green: Lines or characters that are added in the new version.
- White: Content that is identical in both versions.