diff options
Diffstat (limited to 'include/git2/merge.h')
-rw-r--r-- | include/git2/merge.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/git2/merge.h b/include/git2/merge.h index 3354fbeab..8a1dfec2e 100644 --- a/include/git2/merge.h +++ b/include/git2/merge.h @@ -192,6 +192,26 @@ GIT_EXTERN(int) git_merge_trees( const git_merge_tree_opts *opts); /** + * Merge two commits, producing a `git_index` that reflects the result of + * the merge. + * + * The returned index must be freed explicitly with `git_index_free`. + * + * @param out pointer to store the index result in + * @param repo repository that contains the given trees + * @param our_commit the commit that reflects the destination tree + * @param their_commit the commit to merge in to `our_commit` + * @param opts the merge tree options (or null for defaults) + * @return zero on success, -1 on failure. + */ +GIT_EXTERN(int) git_merge_commits( + git_index **out, + git_repository *repo, + const git_commit *our_commit, + const git_commit *their_commit, + const git_merge_tree_opts *opts); + +/** * Merges the given commits into HEAD, producing a new commit. * * @param out the results of the merge |