pub fn find_head_rev_by_refs<G>(
graph: &G,
snp: NodeId,
ref_name_ids: &[LabelNameId],
) -> Result<Option<NodeId>>where
G: SwhLabeledForwardGraph + SwhGraphWithProperties,
<G as SwhGraphWithProperties>::Maps: Maps,
<G as SwhGraphWithProperties>::LabelNames: LabelNames,
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.