Function gix_revision::describe
source · pub fn describe<'name, Find, E>(
commit: &oid,
find: Find,
_: Options<'name>
) -> Result<Option<Outcome<'name>>, Error<E>>where
Find: for<'b> FnMut(&oid, &'b mut Vec<u8>) -> Result<Option<CommitRefIter<'b>>, E>,
E: Error + Send + Sync + 'static,
Expand description
Given a commit
id, traverse the commit graph and collect candidate names from the name_by_oid
mapping to produce
an Outcome
, which converted into_format()
will produce a typical git describe
string.
Note that the name_by_oid
map is returned in the Outcome
, which can be forcefully returned even if there was no matching
candidate by setting fallback_to_oid
to true.