Skip to content

Commit

Permalink
Added gc task to base.
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Mar 15, 2008
1 parent 10b880b commit 6c4af60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/git/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@ def repack
self.lib.repack
end

def gc
self.lib.gc
end


## LOWER LEVEL INDEX OPERATIONS ##

Expand Down
4 changes: 4 additions & 0 deletions lib/git/lib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,10 @@ def repack
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 = []
Expand Down

0 comments on commit 6c4af60

Please sign in to comment.