find_head_rev_by_refs

Function find_head_rev_by_refs 

Source
pub fn find_head_rev_by_refs<G>(
    graph: &G,
    snp: NodeId,
    ref_name_ids: &[LabelNameId],
) -> Result<Option<NodeId>>
Expand description

Same as find_head_rev, but with the ability to configure which branch names correspond to the HEAD revision.

Note: this function is also more efficient than find_head_rev, because branch names are pre-resolved to integers once (before calling this function) and compared as integers. See the source code of find_head_rev for an example of how to translate a given set of branch names (like HEAD_REF_NAMES) to label-name IDs for this function.