Skip to main content

resolve_bundle_refs

Function resolve_bundle_refs 

Source
pub fn resolve_bundle_refs(
    repo: &Path,
    backup_refs: &[String],
) -> Result<BundleSelection>
Expand description

Resolve the effective backup_refs into a concrete bundle selection so the S3 bundle contains ONLY the selected branches (a non-selected branch is then genuinely absent from S3).

A **/* pattern means “everything” → BundleSelection::All. Otherwise each pattern is resolved to a concrete, existing ref: a full refs/… is used as-is when it exists; a bare name (main) becomes refs/heads/<name> when it exists; patterns whose ref doesn’t exist are dropped. Order is preserved and duplicates removed. An empty result is a no-op (the caller handles it).