gix_revision

Function describe

Source
pub fn describe<'name>(
    commit: &oid,
    graph: &mut Graph<'_, '_, Flags>,
    _: Options<'name>,
) -> Result<Option<Outcome<'name>>, Error>
Available on crate feature describe only.
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.