Skip to content
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

Usage of diff and patch bindings #174

Open
sineemore opened this issue Dec 19, 2018 · 4 comments
Open

Usage of diff and patch bindings #174

sineemore opened this issue Dec 19, 2018 · 4 comments

Comments

@sineemore
Copy link
Contributor

sineemore commented Dec 19, 2018

I have several problems with diff and patch bindings:

  • when comparing with empty string it reports one context line (empty string itself), but it probably should consider empty string as no input or provide a way to pass nil as empty input,
  • it is not possible to specify (fake) filenames used in place of question marks in --- ? and +++ ?
  • no way to pass context lines number,
  • diff triggers if one of files doesn't exist, it is possible to fake such file with /dev/null, but it is platform dependent,
  • binary files trigger utf8 conversion error, the overall behavior with binary files is yet blurry and it may not be related to bindings

Haven't used patch, but it seems that it works with strings, but not files and possibly requires to split combined diff first.

@naturallymitchell
Copy link
Member

naturallymitchell commented Jan 2, 2019

Ok.. We need patchutils' combinediff and splitdiff. I'm on it

@naturallymitchell
Copy link
Member

@sineemore how we doing on this? please check if those issues cover these items

@sineemore
Copy link
Contributor Author

Mostly, I'll open related patch issues later.

I think I need to put somewhere my WIP on gut, so we can see which hacks were involved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants