diff options
Diffstat (limited to 'lib/bundler/source/git.rb')
-rw-r--r-- | lib/bundler/source/git.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb index 3f69ea1e65..9ce74adc2c 100644 --- a/lib/bundler/source/git.rb +++ b/lib/bundler/source/git.rb @@ -188,9 +188,11 @@ module Bundler end def specs(*) - set_cache_path!(app_cache_path) if has_app_cache? && !local? + set_cache_path!(app_cache_path) if use_app_cache? if requires_checkout? && !@copied + FileUtils.rm_rf(app_cache_path) if use_app_cache? && git_proxy.not_a_bare_repository? + fetch checkout end @@ -321,6 +323,10 @@ module Bundler cached_revision && super end + def use_app_cache? + has_app_cache? && !local? + end + def requires_checkout? allow_git_ops? && !local? && !cached_revision_checked_out? end |