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

Fix array comparison #13

Closed
wants to merge 3 commits into from
Closed

Fix array comparison #13

wants to merge 3 commits into from

Conversation

tamalsaha
Copy link

Also uses edit distance to generate optimal seq for simple arrays.

Fixes #7

Also uses edit distance to generate optimal seq for simple arrays.

Fixes #1
* Append edit distance operations from end to start
* Tests patches from src->dst and dst->src using github.com/evanphx/json-patch
* Fix Null test case
@tamalsaha
Copy link
Author

Anyone interested in this fix, consider using our fork https://github.com/appscode/jsonpatch

@tamalsaha tamalsaha closed this Apr 21, 2018
@tamalsaha tamalsaha deleted the arr branch April 21, 2018 22:19

type JsonPatchOperation struct {
type Operation struct {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tamalsaha Why changing the name?
Controller-runtime is considering switching to use appscode's fork.
But it can be a problem for the existing users due to the breaking change.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what can we do in our fork. Will adding a type alias help?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should help

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added the type alias to 1.0.0 release.

tamalsaha added a commit to gomodules/jsonpatch that referenced this pull request Jan 8, 2019
tamalsaha added a commit to gomodules/jsonpatch that referenced this pull request Jan 8, 2019
@maeglindeveloper
Copy link

Hey everyone :) !
@mattbaird is it possible to have this merged on your repo ?
@tamalsaha good job 👍

@tamalsaha
Copy link
Author

tamalsaha commented Dec 3, 2020

@maeglindeveloper , I maintain a fork here https://github.com/gomodules/jsonpatch/tree/release-2.0 . Feel free to use that. Thanks!

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

Successfully merging this pull request may close these issues.

Generated patch incorrect for Array replacement
3 participants