summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorVicent Marti <vicent@github.com>2014-03-18 16:23:51 +0100
committerVicent Marti <vicent@github.com>2014-03-18 16:23:51 +0100
commit5dd7d2432ed77651110bcbb37479b2d4e5b01b19 (patch)
treefa8fa9cae26c0ff9c1a146a017938a2448229808 /include/git2
parentdd4c6962d736395b32c5ba775439c765631b4846 (diff)
parent0aee025befc82efe3b8a92692ebe852ac56171dd (diff)
downloadlibgit2-5dd7d2432ed77651110bcbb37479b2d4e5b01b19.tar.gz
Merge pull request #2189 from Aimeast/octopus
Implement git_merge_base_octopus
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/merge.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/git2/merge.h b/include/git2/merge.h
index 3563f35d5..cfec32f4d 100644
--- a/include/git2/merge.h
+++ b/include/git2/merge.h
@@ -191,7 +191,7 @@ GIT_EXTERN(int) git_merge_base(
* @param repo the repository where the commits exist
* @param length The number of commits in the provided `input_array`
* @param input_array oids of the commits
- * @return 0 on success, GIT_ENOTFOUND if not found or error code
+ * @return Zero on success; GIT_ENOTFOUND or -1 on failure.
*/
GIT_EXTERN(int) git_merge_base_many(
git_oid *out,
@@ -200,6 +200,21 @@ GIT_EXTERN(int) git_merge_base_many(
const git_oid input_array[]);
/**
+ * Find a merge base in preparation for an octopus merge
+ *
+ * @param out the OID of a merge base considering all the commits
+ * @param repo the repository where the commits exist
+ * @param length The number of commits in the provided `input_array`
+ * @param input_array oids of the commits
+ * @return Zero on success; GIT_ENOTFOUND or -1 on failure.
+ */
+GIT_EXTERN(int) git_merge_base_octopus(
+ git_oid *out,
+ git_repository *repo,
+ size_t length,
+ const git_oid input_array[]);
+
+/**
* Creates a `git_merge_head` from the given reference. The resulting
* git_merge_head must be freed with `git_merge_head_free`.
*