Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
remove paths that lack git repos and then clone
  • Loading branch information
indirect committed Nov 16, 2010
1 parent c324681 commit 9a8ed7c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/bundler/source.rb
Expand Up @@ -609,7 +609,9 @@ def cache
if cached?
return if has_revision_cached?
Bundler.ui.info "Updating #{uri}"
in_cache { git %|fetch --force --quiet --tags "#{uri}" refs/heads/*:refs/heads/*| }
in_cache do
git %|fetch --force --quiet --tags "#{uri}" refs/heads/*:refs/heads/*|
end
else
Bundler.ui.info "Fetching #{uri}"
FileUtils.mkdir_p(cache_path.dirname)
Expand All @@ -620,6 +622,7 @@ def cache
def checkout
unless File.exist?(path.join(".git"))
FileUtils.mkdir_p(path.dirname)
FileUtils.rm_rf(path)
git %|clone --no-checkout "#{cache_path}" "#{path}"|
end
Dir.chdir(path) do
Expand Down Expand Up @@ -664,5 +667,6 @@ def in_cache(&blk)
Dir.chdir(cache_path, &blk)
end
end

end
end

0 comments on commit 9a8ed7c

Please sign in to comment.