mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-05 14:24:27 +00:00
Merge pull request #2256 from jacquesg/graph-descendant
Correct grouping of parentheses
This commit is contained in:
commit
2795fb4ddd
@ -180,7 +180,7 @@ int git_graph_descendant_of(git_repository *repo, const git_oid *commit, const g
|
|||||||
if (git_oid_equal(commit, ancestor))
|
if (git_oid_equal(commit, ancestor))
|
||||||
return 0;
|
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 error;
|
||||||
|
|
||||||
return git_oid_equal(&merge_base, ancestor);
|
return git_oid_equal(&merge_base, ancestor);
|
||||||
|
@ -45,3 +45,11 @@ void test_graph_descendant_of__returns_correct_result(void)
|
|||||||
git_commit_free(other);
|
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));
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user