class Bundler::Source::Git::GitProxy

def copy_to(destination, submodules=false)

def copy_to(destination, submodules=false)
  unless File.exist?(destination.join(".git"))
    FileUtils.mkdir_p(destination.dirname)
    FileUtils.rm_rf(destination)
    git %|clone --no-checkout "#{path}" "#{destination}"|
    File.chmod((0777 & ~File.umask), destination)
  end
  SharedHelpers.chdir(destination) do
    git %|fetch --force --quiet --tags "#{path}"|
    git "reset --hard #{@revision}"
    if submodules
      git "submodule update --init --recursive"
    end
  end
end