Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: git_cache.py

Issue 545213002: Run prune in git cache update bootstrap to remove loose objects (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cache.py
diff --git a/git_cache.py b/git_cache.py
index 5d1af238ede978de79aeef8a8df52999a46e9e05..85d6c97e90d3e8c629930e250c4370be594b638f 100755
--- a/git_cache.py
+++ b/git_cache.py
@@ -425,6 +425,7 @@ class Mirror(object):
gen_number = subprocess.check_output(
[self.git_exe, 'number', 'master'], cwd=self.mirror_path).strip()
self.RunGit(['gc']) # Run Garbage Collect to compress packfile.
+ self.RunGit(['prune']) # Run prune to remove loose objects.
szager1 2014/09/05 16:49:36 Why not just: self.RunGit(['gc', '--prune=all'])
Ryan Tseng 2014/09/05 16:53:53 Didn't know I could do that. Done
# Creating a temp file and then deleting it ensures we can use this name.
_, tmp_zipfile = tempfile.mkstemp(suffix='.zip')
os.remove(tmp_zipfile)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698