git_merge_trees

Merge two trees, producing a git_index that reflects the result of the merge. The index may be written as-is to the working directory or checked out. If the index is to be converted to a tree, the caller should resolve any conflicts that arose as part of the merge.

The returned index must be freed explicitly with git_index_free.

Parameters

out_ libgit2_d.types.git_index**

pointer to store the index result in

repo libgit2_d.types.git_repository*

repository that contains the given trees

ancestor_tree const(libgit2_d.types.git_tree)*

the common ancestor between the trees (or null if none)

our_tree const(libgit2_d.types.git_tree)*

the tree that reflects the destination tree

their_tree const(libgit2_d.types.git_tree)*

the tree to merge in to our_tree

opts const(.git_merge_options)*

the merge tree options (or null for defaults)

Return Value

Type: int

0 on success or error code

Meta