Skip to main content

push_branch

Function push_branch 

Source
pub fn push_branch(
    tx: &dyn Transport,
    store: &ObjectStore,
    branch: &str,
    tip: Hash,
    condition: RefWriteCondition,
) -> Result<(), DispatchError>
Expand description

Push one branch: upload every object reachable from tip that the remote lacks, then CAS-write refs/heads/<branch> under condition.

On a CAS failure (TransportError::RefConflict) this returns DispatchError::NonFastForwardPush so callers can render an actionable fetch-then-retry hint. Does NOT touch local remote-tracking refs — the caller decides when to advance them.