GetRootObjectConflicts returns the conflict root object that matches the given name.
(ctx context.Context, root objinterface.RootValue, tName doltdb.TableName)
| 219 | |
| 220 | // GetRootObjectConflicts returns the conflict root object that matches the given name. |
| 221 | func GetRootObjectConflicts(ctx context.Context, root objinterface.RootValue, tName doltdb.TableName) (conflicts.Conflict, bool, error) { |
| 222 | coll, err := globalCollections[objinterface.RootObjectID_Conflicts].LoadCollection(ctx, root) |
| 223 | if err != nil { |
| 224 | return conflicts.Conflict{}, false, err |
| 225 | } |
| 226 | _, rawID, err := coll.ResolveName(ctx, tName) |
| 227 | if err != nil { |
| 228 | return conflicts.Conflict{}, false, err |
| 229 | } |
| 230 | ro, ok, err := coll.GetRootObject(ctx, rawID) |
| 231 | if err != nil || !ok { |
| 232 | return conflicts.Conflict{}, false, err |
| 233 | } |
| 234 | return ro.(conflicts.Conflict), true, nil |
| 235 | } |
| 236 | |
| 237 | // HandleMerge handles merging root objects. |
| 238 | func HandleMerge(ctx context.Context, mro merge.MergeRootObject) (doltdb.RootObject, *merge.MergeStats, error) { |
no test coverage detected