automerge / automerge-classic

A JSON-like data structure (a CRDT) that can be modified concurrently by different users, and merged again automatically.
http://automerge.org/
MIT License
14.77k stars 467 forks source link

allow referencing existing objects when part of the conflict set #531

Open mpareja opened 1 year ago

mpareja commented 1 year ago

Issue https://github.com/automerge/automerge-rs/issues/526 demonstrated that it was not possible to resolve a conflict by choosing one of the conflicting objects or arrays. The following change allows setting a nested object to be an existing object reference so long as the referenced object id is currently listed as one of the conflicts for the key.