pub struct FetchOutcome {
pub updates: Vec<RefUpdate>,
pub default_branch: Option<String>,
pub new_shallow: Vec<ObjectId>,
pub new_unshallow: Vec<ObjectId>,
pub transfer: TransferStats,
}Expand description
The structured result of a fetch, ready for the embedder’s ref-store apply.
Fields§
§updates: Vec<RefUpdate>Per-ref resolved updates.
default_branch: Option<String>The remote’s default branch (from HEAD symref), if known.
new_shallow: Vec<ObjectId>New shallow boundary commits the server reported (shallow <oid>), already
applied to the local shallow file. The commits’ parents are intentionally
absent from the local object store after this fetch.
new_unshallow: Vec<ObjectId>Commits the server reported as no longer shallow (unshallow <oid>), i.e.
boundaries removed from the local shallow file because their history is
now complete. Populated by a deepen / --unshallow fetch.
transfer: TransferStatsObjects and pack bytes ingested during this fetch.
Implementations§
Source§impl FetchOutcome
impl FetchOutcome
Sourcepub fn branch_count(&self) -> u64
pub fn branch_count(&self) -> u64
Count of remote branch refs represented in Self::updates.
Sourcepub fn tag_count(&self) -> u64
pub fn tag_count(&self) -> u64
Count of remote tag refs represented in Self::updates (peeled lines excluded).
Sourcepub fn reported_updates(&self) -> impl Iterator<Item = &RefUpdate>
pub fn reported_updates(&self) -> impl Iterator<Item = &RefUpdate>
Updates worth reporting to a user, in fetch order (UpdateMode::is_reported).
Sourcepub fn changed_ref_count(&self) -> usize
pub fn changed_ref_count(&self) -> usize
Number of local refs this fetch changed (UpdateMode::modified_repo).
For a FetchOptions::dry_run fetch this counts the refs that would change;
nothing was written.
Sourcepub fn has_rejections(&self) -> bool
pub fn has_rejections(&self) -> bool
Whether any ref update was refused (UpdateMode::is_rejected).