Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Add merge options to Dataset.CommitOptions #2534

Closed
cmasone-attic opened this issue Sep 8, 2016 · 0 comments
Closed

Add merge options to Dataset.CommitOptions #2534

cmasone-attic opened this issue Sep 8, 2016 · 0 comments
Assignees
Labels

Comments

@cmasone-attic
Copy link
Contributor

In code, we want callers to be able to specify optional merge behavior when they commit a new Head for a Dataset -- including disallowing any merging. They should be able to provide a callback for custom conflict resolution, and several defaults will be provided: none, 'left', and 'right'.

This should be implemented in Go and JS

@cmasone-attic cmasone-attic self-assigned this Sep 8, 2016
@cmasone-attic cmasone-attic added P1 and removed P0 labels Sep 20, 2016
cmasone-attic added a commit to cmasone-attic/noms that referenced this issue Oct 26, 2016
This patch adds an optional MergePolicy field to CommitOptions. It's a
callback. If the caller sets it, then the commit code will look for a
common ancestor between the Dataset HEAD and the provided Commit. If
the caller-provided Commit descends from HEAD, then Commit proceeds as
normal.
If it does not, but there is a common ancestor, the code runs
merge.ThreeWay() on the values of the provided Commit, HEAD, and the
common ancestor, invoking the MergePolicy callback to resolve
conflicts. If merge succeeds, a merge Commit is created that descends
from both HEAD and the caller-provided Commit. This becomes the new
HEAD of the Dataset.

Towards attic-labs#2534
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant