Assemble the bounded changes.pack for the closure from the local store.
(
repo: &atomic_repository::Repository,
ordered: &[atomic_core::Hash],
)
| 109 | |
| 110 | /// Assemble the bounded changes.pack for the closure from the local store. |
| 111 | fn changes_pack_for( |
| 112 | repo: &atomic_repository::Repository, |
| 113 | ordered: &[atomic_core::Hash], |
| 114 | ) -> Vec<u8> { |
| 115 | let mut records = Vec::with_capacity(ordered.len()); |
| 116 | for hash in ordered { |
| 117 | let bytes = fs::read(repo.change_store().change_path(hash)).expect("read change"); |
| 118 | records.push(atomic_objects::ObjectRecord::new( |
| 119 | atomic_objects::ObjectFamily::Change, |
| 120 | atomic_core::Hash::of(&bytes).to_hex(), |
| 121 | bytes, |
| 122 | )); |
| 123 | } |
| 124 | atomic_repository::git_binding::assemble_changes_pack( |
| 125 | &records, |
| 126 | &atomic_repository::git_binding::BindingPackLimits::default_limits(), |
| 127 | ) |
| 128 | .expect("assemble pack") |
| 129 | } |
| 130 | |
| 131 | /// Publish a signed binding for `commit` (tree `tree_hex`) over the view's |
| 132 | /// effective closure with the pack attached — the repository-level contract of |
no test coverage detected