pub struct CompactOpts {
pub ref_name: Option<String>,
pub force: bool,
pub with_gc: bool,
pub lock_ttl_seconds: Option<u64>,
pub gc_grace_hours: Option<u64>,
}Expand description
Tunables for Compact::run. Field semantics mirror the CLI flags.
Fields§
§ref_name: Option<String>Compact only the named ref. None triggers the audit-driven
“every ref meeting the heuristic” mode.
force: boolBypass the heuristic and compact unconditionally.
with_gc: boolRun crate::packchain::gc mark+sweep against the same
bucket after a successful compact.
lock_ttl_seconds: Option<u64>Lock TTL for compact’s per-ref lock. When None or Some(0),
falls back to [crate::protocol::push::lock_ttl_from_env] which
honours GIT_REMOTE_OBJECT_STORE_LOCK_TTL_SECONDS. A zero TTL
would defeat per-ref locking (issue #208), so the resolver
clamps it through [crate::protocol::push::resolve_lock_ttl_seconds].
gc_grace_hours: Option<u64>Grace hours forwarded to gc::sweep when with_gc is set.
None falls back to [crate::packchain::gc::grace_hours_from_env]
which honours GIT_REMOTE_OBJECT_STORE_GC_GRACE_HOURS (defaulting
to gc::DEFAULT_GRACE_HOURS when unset).
Trait Implementations§
Source§impl Clone for CompactOpts
impl Clone for CompactOpts
Source§fn clone(&self) -> CompactOpts
fn clone(&self) -> CompactOpts
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompactOpts
impl Debug for CompactOpts
Source§impl Default for CompactOpts
impl Default for CompactOpts
Source§fn default() -> CompactOpts
fn default() -> CompactOpts
Auto Trait Implementations§
impl Freeze for CompactOpts
impl RefUnwindSafe for CompactOpts
impl Send for CompactOpts
impl Sync for CompactOpts
impl Unpin for CompactOpts
impl UnsafeUnpin for CompactOpts
impl UnwindSafe for CompactOpts
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more