diff options
author | Edward Thomson <ethomson@microsoft.com> | 2013-12-02 14:10:04 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@microsoft.com> | 2013-12-03 10:18:53 -0500 |
commit | eac938d96eccb39c30ce94adf7f8cdc06df098fe (patch) | |
tree | c988491670ff34769ebfc5ea041e40256935a4d9 /include/git2/merge.h | |
parent | 553d33732aa69f5dab717181fc3a72b42ce07339 (diff) | |
download | libgit2-eac938d96eccb39c30ce94adf7f8cdc06df098fe.tar.gz |
Bare naked merge and rebase
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 |