← 输入框|github.com|刷新
Skip to content

Track line-count changes when applying fuzzy patches - #238

Merged
wumpz merged 1 commit into
java-diff-utils:masterfrom
PHJ2000:fix-fuzzy-patch-size-offset
Oct 9, 2026
Merged

wumpz merged 1 commit into
java-diff-utils:masterfrom
PHJ2000:fix-fuzzy-patch-size-offset

Conversation

@PHJ2000

@PHJ2000 PHJ2000 commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Include each delta's line-count change in lastPatchDelta. This also makes lastPatchEnd refer to the end of the resulting chunk, so later fuzzy changes search the right positions.

Adds regressions for shrinking changes (including a shifted input) and an expanding change with a newly inserted matching line. Both tests fail before the fix. Full mvn clean verify passes on Java 17: 154 tests, 3 skipped.

Fixes #237.

@wumpz
wumpz merged commit 9a6f529 into java-diff-utils:master Oct 9, 2026
4 checks passed
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.

Fuzzy patching does not account for earlier changes in line count

2 participants