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

Have a look at go-difflib #59

Closed
zimmski opened this issue Dec 2, 2016 · 4 comments
Closed

Have a look at go-difflib #59

zimmski opened this issue Dec 2, 2016 · 4 comments

Comments

@zimmski
Copy link
Collaborator

zimmski commented Dec 2, 2016

Have a look at https://github.com/pmezard/go-difflib and add everything that is implemented in go-difflib but missing in go-diff as an issue.

@h8liu
Copy link

h8liu commented Dec 4, 2016

some drive-by notes:

difflib is ported from python difflib, and it is a basic line diff. where diffmatchpatch seems to have no explicit line diff output. I don't think diffmatchpatch even split the strings into lines first.

fwiw, I did some cleanup on both libs on my own (see https://github.com/shanhuio/third).

just curious, how did you get the ownership of this repo?

@zimmski
Copy link
Collaborator Author

zimmski commented Dec 4, 2016

That is right, go-diff does not split the processed strings. I did not yet have a chance to look at the algorithms of go-difflib (e.g. SequenceMatcher). Is it worth to take a look?
I guess that means that at least #57, #58 and #69 have to be fully implemented, or did I miss something?

I saw your fork when I went through every fork of go-diff #38. I did not include any changes of yours because the commit messages are empty. Would you be interested in doing a PR?

I do not have ownership of this repository, I have collaborator rights. I simply applied for it, otherwise I would have been forced to maintain a fork of this repository. Why are you asking?

@h8liu
Copy link

h8liu commented Dec 4, 2016

It has some interesting stuff on marking junks, besides that, it is a relatively standard one. dmp is more complicated.

for unified and context format, difflib implements the marshalling to the output, but not the unmarshaling from an input. it does not have a patcher.

not really interested on a pull request. many of my changes (like function renaming) will break other downstream packages.

this repo was dormant for a long time. I am just curious if there is any background story that leads you here. :)

@zimmski
Copy link
Collaborator Author

zimmski commented Dec 4, 2016

Then I will simply close this issue since everything that should be implemented has an open issue.

We (@work) are doing a lot of diffs (mostly for source code) and I do not want to call external tools all the time. The reason why I am maintaining this now is that it is annoying when you hit bugs and you see that they are fixed upstream but the original author has moved to other projects. IMHO every company should contribute to at least one OSS project they are using. For us it is not just one, but that is OK 👍

@zimmski zimmski closed this as completed Dec 4, 2016
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