class Gem::Source::Git

def cache # :nodoc:

:nodoc:
def cache # :nodoc:
  return unless @remote
  if File.exist? repo_cache_dir
    Dir.chdir repo_cache_dir do
      system @git, 'fetch', '--quiet', '--force', '--tags',
             @repository, 'refs/heads/*:refs/heads/*'
    end
  else
    system @git, 'clone', '--quiet', '--bare', '--no-hardlinks',
           @repository, repo_cache_dir
  end
end