libgit2

git_graph_descendant_of

Version:

Determine if a commit is the descendant of another commit.

Signature

int git_graph_descendant_of(git_repository *repo, const git_oid *commit, const git_oid *ancestor);

Parameters

In
commit

a previously loaded commit.

In
ancestor

a potential ancestor commit.

Returns

int

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

Versions