summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/git2/merge.h6
-rw-r--r--src/merge.c2
-rw-r--r--tests-clar/revwalk/mergebase.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/include/git2/merge.h b/include/git2/merge.h
index 3f21fb4c8..62fd7d723 100644
--- a/include/git2/merge.h
+++ b/include/git2/merge.h
@@ -85,15 +85,15 @@ GIT_EXTERN(int) git_merge_base(
*
* @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`
+ * @param input_array oids of the commits
* @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);
+ size_t length,
+ const git_oid input_array[]);
/**
* Creates a `git_merge_head` from the given reference
diff --git a/src/merge.c b/src/merge.c
index 2e94ce1cd..b07e8c52f 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -58,7 +58,7 @@ struct merge_diff_df_data {
/* Merge base computation */
-int git_merge_base_many(git_oid *out, git_repository *repo, const git_oid input_array[], size_t length)
+int git_merge_base_many(git_oid *out, git_repository *repo, size_t length, const git_oid input_array[])
{
git_revwalk *walk;
git_vector list;
diff --git a/tests-clar/revwalk/mergebase.c b/tests-clar/revwalk/mergebase.c
index a2dbbc738..2d01647fd 100644
--- a/tests-clar/revwalk/mergebase.c
+++ b/tests-clar/revwalk/mergebase.c
@@ -172,9 +172,9 @@ static void assert_mergebase_many(const char *expected_sha, int count, ...)
va_end(ap);
if (expected_sha == NULL)
- cl_assert_equal_i(GIT_ENOTFOUND, git_merge_base_many(&oid, _repo, oids, count));
+ cl_assert_equal_i(GIT_ENOTFOUND, git_merge_base_many(&oid, _repo, count, oids));
else {
- cl_git_pass(git_merge_base_many(&oid, _repo, oids, count));
+ cl_git_pass(git_merge_base_many(&oid, _repo, count, oids));
cl_git_pass(git_oid_fromstr(&expected, expected_sha));
cl_assert(git_oid_cmp(&expected, &oid) == 0);