-
-
Notifications
You must be signed in to change notification settings - Fork 195
UnifiedDiffReader.parseUnifiedDiff(): Using unified diff with no prefix in file names leads to cut file names in some cases. #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
OK. In the original spec I saw a/ and b/ as starting "virtual" directories. Seeing your example the assumption they are always there was obviously wrong. |
helbaroudy
added a commit
to helbaroudy/java-diff-utils
that referenced
this issue
Mar 15, 2022
helbaroudy
added a commit
to helbaroudy/java-diff-utils
that referenced
this issue
Mar 15, 2022
helbaroudy
added a commit
to helbaroudy/java-diff-utils
that referenced
this issue
Mar 15, 2022
Now the regex only matches with "a/", "b/", "new/" and "old/", previously the slash was taken as optional. fixes java-diff-utils#141
helbaroudy
added a commit
to helbaroudy/java-diff-utils
that referenced
this issue
Mar 15, 2022
helbaroudy
added a commit
to helbaroudy/java-diff-utils
that referenced
this issue
Mar 15, 2022
helbaroudy
added a commit
to helbaroudy/java-diff-utils
that referenced
this issue
Mar 15, 2022
Now the regex only matches with "a/", "b/", "new/" and "old/", previously the slash was taken as optional. fixes java-diff-utils#141
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
When using an unified diff with no a/, b/ prefix in file names as input for UnifiedDiffReader.parseUnifiedDiff(), extracted file names are cut when they start with one of a, b, old new. This seems to be due to this piece of code:
which is located at UnifiedDiffReader::356 in a method called
extractFileName
.To Reproduce
Steps to reproduce the behavior:
For example:
This snipet prints:
Expected behavior
The snippet should print:
System
The text was updated successfully, but these errors were encountered: