From 7b1cb6f56dc19878b4f7a3ad2b05b8b3ec8f2d0f Mon Sep 17 00:00:00 2001 From: "hinoka@chromium.org" Date: Mon, 8 Sep 2014 21:40:50 +0000 Subject: [PATCH] Run prune in git cache update bootstrap to remove loose objects BUG=411236 Review URL: https://codereview.chromium.org/545213002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291865 0039d316-1c4b-4281-b951-d872f2087c98 --- git_cache.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/git_cache.py b/git_cache.py index 5d1af238e..eac209360 100755 --- a/git_cache.py +++ b/git_cache.py @@ -424,7 +424,8 @@ class Mirror(object): # The files are named .zip gen_number = subprocess.check_output( [self.git_exe, 'number', 'master'], cwd=self.mirror_path).strip() - self.RunGit(['gc']) # Run Garbage Collect to compress packfile. + # Run Garbage Collect to compress packfile. + self.RunGit(['gc', '--prune=all']) # Creating a temp file and then deleting it ensures we can use this name. _, tmp_zipfile = tempfile.mkstemp(suffix='.zip') os.remove(tmp_zipfile)