Skip to content

Conversation

catbref
Copy link
Contributor

@catbref catbref commented Feb 28, 2018

Empty-context add-only patches were applied in the wrong place,
typically one line early.

This commit uses the code submitted in the issue but tidied up
and corrected for current master snapshot.

Empty-context add-only patches were applied in the wrong place,
typically one line early.

This commit uses the code submitted in the issue but tidied up
and corrected for current master snapshot.
Bad copy&paste caused use of InsertDelta instead of DeleteDelta
when applying fix for issue #20.

Also improved test to cover empty-context patches that delete lines
to cover this case.
DiffUtils.generateUnifiedDiff() produced off-by-one positions for
hunks with empty context/content.

EmptyContextUnifiedDiffTest.java has been improved to test for this.
(Some test resource files renamed in light of more general use).
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants