class Bundler::Source::Git

def cache

def cache
  if cached?
    Bundler.ui.info "Updating #{uri}"
    in_cache { git %|fetch --force --quiet "#{uri}" refs/heads/*:refs/heads/*| }
  else
    Bundler.ui.info "Fetching #{uri}"
    FileUtils.mkdir_p(cache_path.dirname)
    git %|clone "#{uri}" "#{cache_path}" --bare --no-hardlinks|
  end
end