mirror of
https://git.proxmox.com/git/libgit2
synced 2025-12-30 19:51:27 +00:00
merge: reverse array and length parameter order
Make it pair up with the one for commits. This fixes #1691.
This commit is contained in:
parent
92d19d1671
commit
07fb67f90e
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user