Open KevinWang15 opened 3 years ago
I'm seeing this problem as well. I had to revert to 1.1.0
I also had this problem. All the examples I could find were producing garbage results until I found this issue and realised that 1.2.0
was the culprit. Switched to version 1.1.0
and all seems fine.
@sergi Please take a look when possible, as many other libraries are depending on this one, thanks!
This was broken with https://github.com/sergi/go-diff/commit/db1b095f5e7c905e196ff6bfd56189a41aa76309 by passing a array to diffLinesToStringsMunge
instead of a map.
Calling that function with multiple files, but passing the same array, now leads to duplicated lines for each file in the array, instead of re-using existing lines.
Any updates here?
I ran into this issue as well. Reverting to 1.1.0 fixes it.
go mod edit -exclude=github.com/sergi/go-diff@v1.2.0
may be helpful to prevent an accidental upgrade with go mod tidy
or go get -u ./...
.
I created https://github.com/sergi/go-diff/pull/136 which should fix the issue.
@sergi Any chance of merging #120 or #136 to fix this? This library is currently giving incorrect results.
https://github.com/sergi/go-diff/pull/136 was merged yesterday, so this should be resolved now.
This testcase:
Will produce
In v1.2.0, which is incorrect.
In v1.1.0, it produces the correct diff of