Skip to content

Commit 6c4af60

Browse files
committed
Added gc task to base.
1 parent 10b880b commit 6c4af60

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/git/base.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,10 @@ def repack
363363
self.lib.repack
364364
end
365365

366+
def gc
367+
self.lib.gc
368+
end
369+
366370

367371
## LOWER LEVEL INDEX OPERATIONS ##
368372

lib/git/lib.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,10 @@ def repack
517517
command('repack', ['-a', '-d'])
518518
end
519519

520+
def gc
521+
command('gc', ['--prune', '--aggressive', '--auto'])
522+
end
523+
520524
# reads a tree into the current index file
521525
def read_tree(treeish, opts = {})
522526
arr_opts = []

0 commit comments

Comments
 (0)