class documentation

Handles git merge operations.

Method __init__ Initialize merger.
Method merge_blobs Perform three-way merge on blob contents.
Method merge_trees Perform three-way merge on trees.
Instance Variable config Undocumented
Instance Variable gitattributes Undocumented
Instance Variable object_store Undocumented
def __init__(self, object_store: BaseObjectStore, gitattributes: GitAttributes | None = None, config: Config | None = None):

Initialize merger.

Parameters
object_store:BaseObjectStoreObject store to read objects from
gitattributes:GitAttributes | NoneOptional GitAttributes object for checking merge drivers
config:Config | NoneOptional Config object for loading merge driver configuration
def merge_blobs(self, base_blob: Blob | None, ours_blob: Blob | None, theirs_blob: Blob | None, path: bytes | None = None) -> tuple[bytes, bool]:

Perform three-way merge on blob contents.

Parameters
base_blob:Blob | NoneCommon ancestor blob (can be None)
ours_blob:Blob | NoneOur version of the blob (can be None)
theirs_blob:Blob | NoneTheir version of the blob (can be None)
path:bytes | NoneOptional path of the file being merged
Returns
tuple[bytes, bool]Tuple of (merged_content, had_conflicts)
def merge_trees(self, base_tree: Tree | None, ours_tree: Tree, theirs_tree: Tree) -> tuple[Tree, list[bytes]]:

Perform three-way merge on trees.

Parameters
base_tree:Tree | NoneCommon ancestor tree (can be None for no common ancestor)
ours_tree:TreeOur version of the tree
theirs_tree:TreeTheir version of the tree
Returns
tuple[Tree, list[bytes]]tuple of (merged_tree, list_of_conflicted_paths)
config =

Undocumented

gitattributes =

Undocumented

object_store =

Undocumented