diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-10-25 11:40:31 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-10-26 10:00:53 +0200 |
commit | 8ec3769556273e96d128f7203151284bd6765bdd (patch) | |
tree | f61d9aee4b63d926b85420d9c9cc1461e4f1e9f6 /gbp | |
parent | 3fcf009e6eafa68510c543dbde12341eb14c04d5 (diff) |
GitRepository: Add collect_garbage
Diffstat (limited to 'gbp')
-rw-r--r-- | gbp/git.py | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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. |