summaryrefslogtreecommitdiff
path: root/include/git2/merge.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2013-04-16 17:46:41 +0200
committerVicent Marti <tanoku@gmail.com>2013-04-16 17:46:41 +0200
commita50086d174658914d4d6462afbc83b02825b1f5b (patch)
treee8daa1c7bf678222cf351445179837bed7db3a72 /include/git2/merge.h
parent5b9fac39d8a76b9139667c26a63e6b3f204b3977 (diff)
parentf124ebd457bfbf43de3516629aaba5a279636e04 (diff)
downloadlibgit2-0.18.0.tar.gz
Merge branch 'development'v0.18.0
Diffstat (limited to 'include/git2/merge.h')
-rw-r--r--include/git2/merge.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/include/git2/merge.h b/include/git2/merge.h
index 5a0b2e7f2..f4c5d9881 100644
--- a/include/git2/merge.h
+++ b/include/git2/merge.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009-2012 the libgit2 contributors
+ * Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
@@ -27,8 +27,28 @@ GIT_BEGIN_DECL
* @param repo the repository where the commits exist
* @param one one of the commits
* @param two the other commit
+ * @return Zero on success; GIT_ENOTFOUND or -1 on failure.
*/
-GIT_EXTERN(int) git_merge_base(git_oid *out, git_repository *repo, git_oid *one, git_oid *two);
+GIT_EXTERN(int) git_merge_base(
+ git_oid *out,
+ git_repository *repo,
+ const git_oid *one,
+ const git_oid *two);
+
+/**
+ * Find a merge base given a list of commits
+ *
+ * @param out the OID of a merge base considering all the commits
+ * @param repo the repository where the commits exist
+ * @param input_array oids of the commits
+ * @param length The number of commits in the provided `input_array`
+ * @return Zero on success; GIT_ENOTFOUND or -1 on failure.
+ */
+GIT_EXTERN(int) git_merge_base_many(
+ git_oid *out,
+ git_repository *repo,
+ const git_oid input_array[],
+ size_t length);
/** @} */
GIT_END_DECL