Skip to content

Make second call to diff_cleanupSemantic inside the diff_lineMode_#2

Open
vors wants to merge 2 commits intoReviewable:masterfrom
vors:sergei/second-cleanup-semantic-call
Open

Make second call to diff_cleanupSemantic inside the diff_lineMode_#2
vors wants to merge 2 commits intoReviewable:masterfrom
vors:sergei/second-cleanup-semantic-call

Conversation

@vors
Copy link
Copy Markdown

@vors vors commented Sep 25, 2022

Improve the case presented in Reviewable/Reviewable#326 (comment)

Concretely there is already a sequence of calls

diff_lineMode_ -> diff_cleanupSemantic -> diff_cleanupSemanticLossless

which performs the optimal alignment for deletes and adds based on the diff_cleanupSemanticScore_ function.
However, this alignment could be altered by the remaining code in diff_lineMode_ hence we should call the diff_cleanupSemantic again at the end of the function.

The added tests demonstrate the problem.


This change is Reviewable

@vors vors force-pushed the sergei/second-cleanup-semantic-call branch from 69d4a81 to eaa3a9f Compare September 25, 2022 23:22
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