-
Notifications
You must be signed in to change notification settings - Fork 49
MultiFileDiffReader doesn’t handle messages in diff that certain files are only available in specific version. #49
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
Would you accept a pull request to fix this? |
Don't think so, we should probably make sure we do proper nil checks in our codebase, but that shouldn't affect work in this repository. |
@eseliger yes, you are right :) It mostly clarifies deleted/created files (except maybe files that actually have been renamed, but this couldn't be handled, as they will be marked as deleted with originName and created with NewName). It will just require an extra step for checking whether source_a should be marked as OrigSource or NewSource. |
Sounds like it's another way to express deleted/created in diffs and supporting that would just be additional functionality that would have no effect on the existing code. If so, yeah, I think we should accept a PR :) |
In some unified diff files there are such lines as
Only in {path}: {filename}
, meaning that certain files are only available in specific version. Those messages aren’t handled in any way, except when those lines are just catched in FileDiff.Extended for next FileDiff in the file.Are there any plans of handling these messages?
For example, those unique files can be picked up in next functions, representing them as FileDiff with only the value OrigName.
Then for this file example, the output below for ReadAllFiles() would be expected.
my_diff.txt
The text was updated successfully, but these errors were encountered: