Skip to main content

peel_until

Function peel_until 

Source
pub fn peel_until<G>(
    graph: &G,
    node: NodeId,
    target_type: NodeConstraint,
) -> Result<Option<NodeId>>
Expand description

Recursively peel a node until a node with a type matching the specified constraint is reached.

This is analogous to libgit2’s git_object_peel.

See peel_once for peeling rules.

See peel to peel to any type that is different from node’s (analogous to GIT_OBJECT_ANY)

Returns Ok(Some(node_id)) on success, where node_id is the peel result, Ok(None) if no suitable successor exists (e.g., a root revision with no directory successor).