pub fn head_contains_commit(root: &Path, sha: &str) -> Result<bool>Expand description
Whether HEAD contains commit sha (either equal to HEAD or an ancestor
of HEAD).
Returns Ok(false) when sha is absent from the local object store or is
not an ancestor of HEAD.
ยงErrors
Returns an error when root is not inside a git repository, HEAD cannot
be read, sha is not a valid commit hex id, or the ancestry walk fails.