pub fn push_all(cwd: &Path, tx: &dyn Transport) -> Result<usize, DispatchError>Expand description
Push every ref under refs/heads/ to the remote, assembling a pack
of every object reachable from the branch tip that the remote does
not already hold. Returns the count of refs pushed.
Per-ref flow:
- Resolve the local branch tip.
- Walk reachable objects (
ops::reachable_objects). - Filter out any object the remote already has via
Transport::pack_exists(single-object packs, so the digest == pack key). - Build a pack with
PackWriter; the whole-pack digest is thePackKeyused byTransport::upload_pack. - Publish the ref with
Transport::write_ref.