Skip to main content

gc

Function gc 

Source
pub fn gc(store: &Path, max_bytes: u64) -> Result<GcOutcome>
Expand description

Evict objects until the store fits within max_bytes.

Objects no live checkout can reach are evicted first, so deleting a worktree releases what only that worktree needed. Within each class eviction is least-recently-used by access time where the filesystem records it, falling back to modification time. A restore verifies the blob it serves, which means it reads the whole file and the access time is real – but only where the mount records one, so the ordering is an approximation either way. Evicting a live object costs a recompile, never correctness.