git_graph_descendant_of

Determine if a commit is the descendant of another commit.

Note that a commit is not considered a descendant of itself, in contrast to git merge-base --is-ancestor.

extern (C) nothrow @nogc public
int
git_graph_descendant_of

Parameters

repo libgit2.types.git_repository*

the repository where the commits exist

commit const(libgit2.oid.git_oid)*

a previously loaded commit

ancestor const(libgit2.oid.git_oid)*

a potential ancestor commit

Return Value

Type: int

1 if the given commit is a descendant of the potential ancestor, 0 if not, error code otherwise.

Meta