You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
line 19 will be raised as change rather than insert:
The object created by parseUnifiedDiff() allows me to re-parse with DiffUtils.diff(delta.getSourceLines, delta.getTargetLines) to obtain the correct DeltaType (in this case INSERT, not CHANGE) but it obviously loses the line numbering (position):
original delta obtained by parseUnifiedDiff().getFiles().get(0).getPatch().getDeltas() -
re-parsed with DiffUtils.diff() -
Perhaps I am doing something wrong... but instinctively, shouldn't parseUnifiedDiff already assign the correct DeltaType?
The text was updated successfully, but these errors were encountered:
You are right, that finalizeChunk only creates Change instances. This works, but you are right, that the right type should be put in there. PRs are welcome.
Good day everyone,
I am trying to wrap my head around the library, and this might be more of a question rather than a bug(?)...
When parsing unidiffs in this format:
https://github.com/java-diff-utils/java-diff-utils/blob/01a7fb16cfc33abc3e6ac4adcc2db79438f56fcf/java-diff-utils/src/test/resources/com/github/difflib/unifieddiff/jsqlparser_patch_1.diff
line 19 will be raised as change rather than insert:
The object created by parseUnifiedDiff() allows me to re-parse with DiffUtils.diff(delta.getSourceLines, delta.getTargetLines) to obtain the correct DeltaType (in this case INSERT, not CHANGE) but it obviously loses the line numbering (position):
original delta obtained by parseUnifiedDiff().getFiles().get(0).getPatch().getDeltas() -

re-parsed with DiffUtils.diff() -

Perhaps I am doing something wrong... but instinctively, shouldn't parseUnifiedDiff already assign the correct DeltaType?
The text was updated successfully, but these errors were encountered: