#[non_exhaustive]pub struct GcOptions {
pub repack: RepackOptions,
pub expire_reflog: bool,
pub now_unix: i64,
pub pack_refs: bool,
pub write_commit_graph: bool,
pub drop_large_blobs: bool,
}Expand description
Options for gc().
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.repack: RepackOptionsRepack options applied before pruning unreachable objects.
expire_reflog: boolExpire reflogs using gc.reflogExpire* before repack/prune.
now_unix: i64Unix seconds for reflog expiry rules.
pack_refs: boolWhen true, pack loose refs before other gc steps.
write_commit_graph: boolWhen true, write objects/info/commit-graph after repack/prune.
Changed-path Bloom filters are kept when the existing graph has them and are not
added otherwise, matching git gc.
drop_large_blobs: boolWhen true (the default), run the drop-large-blobs phase after repack if
maintenance.drop-large-blobs.enabled is set (see drop_promised_blobs).
False never runs it. The phase takes its recency cutoff from
Self::now_unix and is skipped (DropPromisedBlobsSkip::NoCurrentTime)
when that is 0.
Implementations§
Source§impl GcOptions
impl GcOptions
Sourcepub fn with_repack_dry_run(dry_run: bool, now_unix: i64) -> Self
pub fn with_repack_dry_run(dry_run: bool, now_unix: i64) -> Self
Run gc with repack dry-run control and an explicit wall-clock for reflog expiry.
Sourcepub fn with_reflog_policy(now_unix: i64, expire_reflog: bool) -> Self
pub fn with_reflog_policy(now_unix: i64, expire_reflog: bool) -> Self
Default repack with explicit reflog expiry policy and wall-clock.