Does a ref name (e.g. refs/heads/main) match a backup_refs pattern?
**/* match everything; a full ref matches exactly; a bare branch name
(main) matches refs/heads/<name>.
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).
Build the per-ref summary block printed to the hook’s stdout after a push —
one line per pushed ref (in receive order) showing which durable tiers it
reached.