pub struct PackBuildOptions {
pub thin: bool,
pub delta: bool,
pub window: usize,
pub max_depth: usize,
pub use_ofs_delta: bool,
pub respect_islands: bool,
pub reuse_deltas: bool,
}Expand description
Options controlling build_pack.
Fields§
§thin: boolBuild a thin pack: allow deltas whose base is reachable from the haves
(so present on the peer) but not itself emitted in the pack. The base
is referenced by REF_DELTA and the peer reconstructs the object from its
own copy. Requires Self::delta to have any effect.
delta: boolEmit delta-compressed objects (OFS_DELTA/REF_DELTA) for similar blobs
instead of whole objects. When false the builder emits whole objects
only (the phase-1 behavior).
window: usizeHow many candidate bases (size-sorted neighbors) to consider per blob.
0 disables in-pack delta selection. Mirrors Git’s --window.
max_depth: usizeCap delta chain length (number of edges). 0 stores all blobs whole.
Mirrors Git’s --depth.
use_ofs_delta: boolUse OFS_DELTA (offset-relative base) when the base precedes the target
in the pack; otherwise REF_DELTA (base named by OID). Thin/external
bases always use REF_DELTA regardless of this flag.
respect_islands: boolHonor delta islands (pack.island config) when selecting bases, so a
target only deltas against a base in a compatible (superset) island and
the base preference is biased toward objects living in dominating islands.
Mirrors git pack-objects --delta-islands. When false (the default,
preserving the prior behavior) islands are ignored entirely — equivalent
to no pack.island config. Loading islands walks the ref graph, so this
only does work when the repository actually configures islands.
reuse_deltas: boolReuse on-disk REF_DELTA/OFS_DELTA edges from existing packs when both
the target and its recorded base are in this pack, instead of recomputing
a fresh delta. Mirrors Git’s reuse_delta window-reuse path.
false (the default) preserves the prior behavior of always computing
fresh deltas. Reuse only applies to SHA-1 packs (the reuse helpers read
20-byte index entries) and is skipped silently otherwise.
Trait Implementations§
Source§impl Clone for PackBuildOptions
impl Clone for PackBuildOptions
Source§fn clone(&self) -> PackBuildOptions
fn clone(&self) -> PackBuildOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more