projects
/
tools
/
git-buildpackage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3fcf009
)
GitRepository: Add collect_garbage
author
Guido Günther
<agx@sigxcpu.org>
Tue, 25 Oct 2011 09:40:31 +0000
(11:40 +0200)
committer
Guido Günther
<agx@sigxcpu.org>
Wed, 26 Oct 2011 08:00:53 +0000
(10:00 +0200)
gbp/git.py
patch
|
blob
|
history
diff --git
a/gbp/git.py
b/gbp/git.py
index
83f0505
..
f52b09b
100644
(file)
--- a/
gbp/git.py
+++ b/
gbp/git.py
@@
-840,6
+840,16
@@
class GitRepository(object):
if ret:
raise GitRepositoryError, "unable to archive %s"%(treeish)
+ def collect_garbage(self, auto=False):
+ """
+ Cleanup unnecessary files and optimize the local repository
+
+ param auto: only cleanup if required
+ param auto: bool
+ """
+ args = [ '--auto' ] if auto else []
+ self._git_command("gc", args)
+
def fetch(self, repo=None):
"""
Download objects and refs from another repository.