Skip to content

fix: preserve equal rows from patches - #233

Open
Chanakan5591 wants to merge 1 commit into
java-diff-utils:masterfrom
Chanakan5591:fix/equal-delta-diff-rows
Open

Chanakan5591 wants to merge 1 commit into
java-diff-utils:masterfrom
Chanakan5591:fix/equal-delta-diff-rows

Conversation

@Chanakan5591

Copy link
Copy Markdown

Problem

DiffRowGenerator.generateDiffRows(List, Patch) incorrectly handles
EqualDelta instances as changes.

When a patch contains equal parts, such as a patch generated with
includeEqualParts = true, unchanged rows are returned with
DiffRow.Tag.CHANGE instead of DiffRow.Tag.EQUAL.

Changes

  • Handle EqualDelta explicitly as an equal row.
  • Preserve configured equality processing for unchanged lines.
  • Add regression tests for both inline and non-inline diff modes.

Functional Validation

  • Ran mvn -pl java-diff-utils test
  • 149 tests passed
  • 0 failures
  • 0 errors
  • 3 pre-existing unrelated tests skipped
  • Checkstyle passed with 0 violations

This change does not modify any public API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant