pub struct WriteMultiPackIndexOptions {
pub preferred_pack_idx: Option<u32>,
pub preferred_pack_name: Option<String>,
pub pack_names_subset_ordered: Option<Vec<String>>,
pub write_bitmap: bool,
pub incremental: bool,
pub write_rev_sidecar: bool,
pub version: Option<u8>,
pub diagnostics: Option<DiagnosticsHandle>,
}Expand description
Options for writing a multi-pack index (extension of the simple writer).
Fields§
§preferred_pack_idx: Option<u32>When set, objects also present in other packs are taken from this pack
(pack_names index in the sorted name list).
preferred_pack_name: Option<String>Basename of the preferred pack (e.g. pack-abc.idx or pack-abc.pack); resolved against
the working pack name list after optional subset filtering.
pack_names_subset_ordered: Option<Vec<String>>If set, only these pack-*.idx basenames are included, in this order (Git --stdin-packs).
write_bitmap: boolWhen true, append RIDX + BTMP chunks and write a reachability .bitmap sidecar
(non-incremental root MIDX and compaction only; incremental layers skip the bitmap).
incremental: boolWhen true, write a new layer in multi-pack-index.d/ and extend the chain file
instead of replacing pack/multi-pack-index.
write_rev_sidecar: boolWhen true with Self::write_bitmap, emit a standalone .rev sidecar and omit the
embedded RIDX chunk (Git GIT_TEST_MIDX_WRITE_REV compatibility).
version: Option<u8>On-disk MIDX format version to write (1 or 2). None writes v1, which every Git
with multi-pack-index support can read; v2 (readable only by newer Git) is written
only when requested. crate::maintenance::write_midx fills this from midx.version.
Any other value fails with MidxError::UnknownWriteVersion.
diagnostics: Option<DiagnosticsHandle>When set, non-fatal MIDX write warnings are reported here instead of being discarded.