Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
07fb67f9
Commit
07fb67f9
authored
Sep 22, 2013
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge: reverse array and length parameter order
Make it pair up with the one for commits. This fixes #1691.
parent
92d19d16
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
include/git2/merge.h
+3
-3
src/merge.c
+1
-1
tests-clar/revwalk/mergebase.c
+2
-2
No files found.
include/git2/merge.h
View file @
07fb67f9
...
...
@@ -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
...
...
src/merge.c
View file @
07fb67f9
...
...
@@ -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
;
...
...
tests-clar/revwalk/mergebase.c
View file @
07fb67f9
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment