Skip to main content

plan_push_steps

Function plan_push_steps 

Source
pub fn plan_push_steps(
    store: &ObjectStore,
    tip: Hash,
    remote_tip: Option<Hash>,
    limits: UploadLimits,
    pack_payload_cap: u64,
    ctl: &PushControl<'_>,
    condition: RefWriteCondition,
    branch: &str,
) -> Result<Vec<Hash>, DispatchError>
Expand description

The commits to advance the remote head through, oldest first, ending at tip. One entry means the push is not split.

Refuses, before anything is uploaded, a push that would need more than ctl.max_steps advances, one whose grants do not cover every advance, and one containing a single commit that cannot fit in an advance.

ยงErrors

DispatchError::PushSplitLimit, DispatchError::PushNotAuthorized, DispatchError::PushTooLarge, or a store or planning failure.