From 6c4af60f5fc5193b956a4698b604ad96ef3c51c6 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 14 Mar 2008 22:21:21 -0500 Subject: Added gc task to base. --- lib/git/base.rb | 4 ++++ lib/git/lib.rb | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'lib/git') diff --git a/lib/git/base.rb b/lib/git/base.rb index a670fd8..43a3c0d 100644 --- a/lib/git/base.rb +++ b/lib/git/base.rb @@ -363,6 +363,10 @@ module Git self.lib.repack end + def gc + self.lib.gc + end + ## LOWER LEVEL INDEX OPERATIONS ## diff --git a/lib/git/lib.rb b/lib/git/lib.rb index 71f960a..c9c46e0 100644 --- a/lib/git/lib.rb +++ b/lib/git/lib.rb @@ -517,6 +517,10 @@ module Git command('repack', ['-a', '-d']) end + def gc + command('gc', ['--prune', '--aggressive', '--auto']) + end + # reads a tree into the current index file def read_tree(treeish, opts = {}) arr_opts = [] -- cgit