OXY-SYNC-CONTAINER 1.0
OXY-SYNC-CONTAINER Library Documentation
Loading...
Searching...
No Matches
oxy::sync::merge_commit_fn Struct Reference

Function object for performing a merge commit operation. More...

#include <merge.hpp>

Public Member Functions

maybe< oid_t > operator() (connection_ptr const &conn, oid_t const &our, oid_t const &other, merge_callback const &callback) const
 Perform a merge commit operation.

Detailed Description

Function object for performing a merge commit operation.

This functor provides an operator() that takes a connection pointer, identifiers of the current and other commits, and a callback function to resolve potential conflicts. It returns a maybe<oid_t> containing the identifier of the merge commit if successful, or an empty maybe\ if the merge operation fails. The merge commit operation is performed by finding the common ancestor of the two commits and resolving conflicts using the provided callback function.

Member Function Documentation

◆ operator()()

maybe< oid_t > oxy::sync::merge_commit_fn::operator() ( connection_ptr const & conn,
oid_t const & our,
oid_t const & other,
merge_callback const & callback ) const

Perform a merge commit operation.

Parameters
conn- The connection pointer to use for the operation.
our- Identifier of the current commit.
other- Identifier of the other commit.
callback- Callback function to resolve potential conflicts.
Returns
Maybe containing the identifier of the merge commit if successful.