Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 15 lines (13 sloc) 317 Bytes
#!/usr/bin/env ruby
require File.expand_path(File.dirname(__FILE__) + '/shared')
require 'etc'
DIRS = Dir[*config(:glob)]
DIRS.each do |dir|
puts "# Garbage collecting #{dir}"
Dir.chdir(dir) do
stat = File.stat(dir)
username = Etc.getpwuid(stat.uid).name
quiet_sh "su -c 'git gc' #{username}"
end
puts
end