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
2795fb4d
Commit
2795fb4d
authored
Apr 08, 2014
by
Vicent Marti
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2256 from jacquesg/graph-descendant
Correct grouping of parentheses
parents
5f74c476
8a8e3127
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletions
+9
-1
src/graph.c
+1
-1
tests/graph/descendant_of.c
+8
-0
No files found.
src/graph.c
View file @
2795fb4d
...
...
@@ -180,7 +180,7 @@ int git_graph_descendant_of(git_repository *repo, const git_oid *commit, const g
if
(
git_oid_equal
(
commit
,
ancestor
))
return
0
;
if
((
error
=
git_merge_base
(
&
merge_base
,
repo
,
commit
,
ancestor
)
<
0
)
)
if
((
error
=
git_merge_base
(
&
merge_base
,
repo
,
commit
,
ancestor
)
)
<
0
)
return
error
;
return
git_oid_equal
(
&
merge_base
,
ancestor
);
...
...
tests/graph/descendant_of.c
View file @
2795fb4d
...
...
@@ -45,3 +45,11 @@ void test_graph_descendant_of__returns_correct_result(void)
git_commit_free
(
other
);
}
void
test_graph_descendant_of__nopath
(
void
)
{
git_oid
oid
;
git_oid_fromstr
(
&
oid
,
"e90810b8df3e80c413d903f631643c716887138d"
);
cl_assert_equal_i
(
0
,
git_graph_descendant_of
(
_repo
,
git_commit_id
(
commit
),
&
oid
));
}
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