Skip to content

Patch Inversion #2

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

Open
mnot opened this issue May 8, 2014 · 2 comments
Open

Patch Inversion #2

mnot opened this issue May 8, 2014 · 2 comments

Comments

@mnot
Copy link
Member

mnot commented May 8, 2014

See:
cujojs/jiff#9

@briancavalier
Copy link

Also see cujojs/jiff#15 - brainstorming possible ways to allow inversion.

@espadrine
Copy link

I personally lean towards cujojs/jiff#15 (comment), using the key was. I implemented that in https://github.com/espadrine/json-diff.

However, there's a small catch: if an add operation was generated, but it replaces data instead of just adding it, its inverse won't yield the original document. I suppose the patch generator has to ensure that they only use add as a strict add.

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

No branches or pull requests

3 participants