Index a pack's objects of one family into `content key → bytes`.
(pack: &SyncPack, family: ObjectFamily)
| 99 | |
| 100 | /// Index a pack's objects of one family into `content key → bytes`. |
| 101 | fn pack_objects_by_key(pack: &SyncPack, family: ObjectFamily) -> HashMap<String, Vec<u8>> { |
| 102 | pack.objects |
| 103 | .iter() |
| 104 | .filter(|o| o.family == family) |
| 105 | .map(|o| (o.key.clone(), o.bytes.clone())) |
| 106 | .collect() |
| 107 | } |
| 108 | |
| 109 | /// Reconstruct the requested view's metadata chain from a sync pack in |
| 110 | /// root-to-leaf order. The server includes the requested ref and every ancestor |