libgit2

git_graph_reachable_from_any

Version:

Determine if a commit is reachable from any of a list of commits by following parent edges.

Signature

int git_graph_reachable_from_any(git_repository *repo, const git_oid *commit, const git_oid *descendant_array, size_t length);

Parameters

In
repo

the repository where the commits exist

In
commit

a previously loaded commit

In
descendant_array

oids of the commits

size_t
In
length

the number of commits in the provided descendant_array

Returns

int

1 if the given commit is an ancestor of any of the given potential descendants, 0 if not, error code otherwise.

Versions