From f6159fbdd2d952490bef208c68204e6168188840 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Tue, 16 Jan 2024 14:22:21 -0800 Subject: [PATCH] clone: also cleanup checkout with `git gc` --- ofborg/src/clone.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ofborg/src/clone.rs b/ofborg/src/clone.rs index 5e2fa46..b054f0f 100644 --- a/ofborg/src/clone.rs +++ b/ofborg/src/clone.rs @@ -147,6 +147,13 @@ pub trait GitClonable { .stdout(Stdio::null()) .status()?; + debug!("git gc"); + Command::new("git") + .arg("gc") + .current_dir(self.clone_to()) + .stdout(Stdio::null()) + .status()?; + lock.unlock(); Ok(())