Function git_is_ancestor

Source
pub fn git_is_ancestor(
    git: &Repository,
    ancestor: Oid,
    target: Oid,
) -> Result<()>
Expand description

Returns whether ancestor is an ancestor of target.

A commit is considered to be an ancestor of another commit if there is a path from the first commit to the target commit. Note: this does not authenticate the path, or even check whether the commits are signed. Commits are considered their own ancestors.

Returns Ok(()) if there is a path. If there is no path, returns Err(Error::NoPathConnecting).