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
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 #201.