class documentation
Handles git merge operations.
| Method | __init__ |
Initialize merger. |
| Method | merge |
Perform three-way merge on blob contents. |
| Method | merge |
Perform three-way merge on trees. |
| Instance Variable | config |
Undocumented |
| Instance Variable | gitattributes |
Undocumented |
| Instance Variable | object |
Undocumented |
def __init__(self, object_store:
BaseObjectStore, gitattributes: GitAttributes | None = None, config: Config | None = None):
¶
Initialize merger.
| Parameters | |
objectBaseObjectStore | Object store to read objects from |
gitattributes:GitAttributes | None | Optional GitAttributes object for checking merge drivers |
config:Config | None | Optional 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 | |
baseBlob | None | Common ancestor blob (can be None) |
oursBlob | None | Our version of the blob (can be None) |
theirsBlob | None | Their version of the blob (can be None) |
path:bytes | None | Optional path of the file being merged |
| Returns | |
tuple[ | Tuple of (merged_content, had_conflicts) |