Skip to main content

PackBuildOptions

Struct PackBuildOptions 

Source
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: bool

Build 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: bool

Emit 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: usize

How many candidate bases (size-sorted neighbors) to consider per blob. 0 disables in-pack delta selection. Mirrors Git’s --window.

§max_depth: usize

Cap delta chain length (number of edges). 0 stores all blobs whole. Mirrors Git’s --depth.

§use_ofs_delta: bool

Use 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: bool

Honor 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: bool

Reuse 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

Source§

fn clone(&self) -> PackBuildOptions

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for PackBuildOptions

Source§

impl Debug for PackBuildOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PackBuildOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.