Comparing dcostap:master...java-diff-utils:master · dcostap/java-diff-utils
Commits on May 5, 2026
-
Fix UnifiedDiffReader to use correct DeltaType
finalizeChunk() previously always created ChangeDelta regardless of whether the hunk contained only insertions, only deletions, or only context lines. This made it impossible for consumers to determine the actual type of change from the delta alone. Now uses InsertDelta when a hunk contains only additions (no context), DeleteDelta when only deletions (no context), EqualDelta when only context, and ChangeDelta otherwise. Hunks with context lines still use ChangeDelta to preserve backward-compatible applyTo behavior. Fixes java-diff-utils#201