pub enum ExplodePolicy {
Off,
Graph,
Full,
}Expand description
How much of a pack is resolved into the exploded table.
Three values and not a boolean, because a flat off-switch reintroduces a
correctness bug this table exists to fix. Commit and tree payloads used to
live only in RAM, so a clean shutdown came back with every pack’s
indexed bit legitimately set and an EMPTY graph — MEASURED on oden
2026-08-08: 2687 rows and 0 of 551 commits, reachable() returning a
commit instead of its closure and gc seeing an empty live set.
MEASURED on linux.git: resolved content is 16.8 GB against a 6.4 GB pack,
and blobs are nearly all of it. So Graph buys the
correctness fix for a small fraction of the disk, and
Full — one-lookup content reads, thin-pack bases,
and the path columns that make the table a filesystem — is the part worth
charging for.
The default is Full, and that is a compatibility
choice rather than a recommendation. §14’s indexed bit is derived by
comparing this table’s row count against the index’s, so a table that is
deliberately short is indistinguishable, on disk, from one that was
dropped — see [crate::git_ops::Absorber::adopt_journal], which weakens that
comparison under Graph and cannot make it exact without a durable
commit-and-tree count. Changing the default would change what a reopen does
on every existing store; the setting is the knob, not the default.
Variants§
Off
Store nothing. Reads re-resolve, and every pack is re-queued on reopen — which is what rebuilds the graph, since nothing it is folded from is on disk.
Graph
Commits and trees only — the graph’s inputs, which is everything a reopen needs to be correct. Blobs re-resolve.
Full
Every object.
Implementations§
Source§impl ExplodePolicy
impl ExplodePolicy
pub const fn wants(self, kind: GitObjectKind) -> bool
pub const fn as_str(self) -> &'static str
Sourcepub fn parse(s: &str) -> Result<Self>
pub fn parse(s: &str) -> Result<Self>
An unknown value is an ERROR, never a silent fall back to the default: a typo that quietly disables a paid tier is not noticed until a bill is wrong.
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Reads ZNIPPY_GIT_EXPLODE (crate::arms::ENV_EXPLODE) through the
crate’s one counted door, once per store open.
Trait Implementations§
Source§impl Clone for ExplodePolicy
impl Clone for ExplodePolicy
Source§fn clone(&self) -> ExplodePolicy
fn clone(&self) -> ExplodePolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ExplodePolicy
Source§impl Debug for ExplodePolicy
impl Debug for ExplodePolicy
Source§impl Default for ExplodePolicy
impl Default for ExplodePolicy
Source§fn default() -> ExplodePolicy
fn default() -> ExplodePolicy
impl Eq for ExplodePolicy
Source§impl PartialEq for ExplodePolicy
impl PartialEq for ExplodePolicy
impl StructuralPartialEq for ExplodePolicy
Auto Trait Implementations§
impl Freeze for ExplodePolicy
impl RefUnwindSafe for ExplodePolicy
impl Send for ExplodePolicy
impl Sync for ExplodePolicy
impl Unpin for ExplodePolicy
impl UnsafeUnpin for ExplodePolicy
impl UnwindSafe for ExplodePolicy
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.