diff options
-rw-r--r-- | lib/bundler/source/git/git_proxy.rb | 6 | ||||
-rw-r--r-- | spec/update/git_spec.rb | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/bundler/source/git/git_proxy.rb b/lib/bundler/source/git/git_proxy.rb index 9b0e95d18c..9c32501d40 100644 --- a/lib/bundler/source/git/git_proxy.rb +++ b/lib/bundler/source/git/git_proxy.rb @@ -123,7 +123,11 @@ module Bundler git_retry %(fetch --force --quiet --tags "#{path}") git "reset --hard #{@revision}" - git_retry "submodule update --init --recursive" if submodules + if submodules + git_retry "submodule update --init --recursive" + else + git_retry "submodule deinit --all" + end end end diff --git a/spec/update/git_spec.rb b/spec/update/git_spec.rb index 94426b68d9..4252010a7d 100644 --- a/spec/update/git_spec.rb +++ b/spec/update/git_spec.rb @@ -158,7 +158,6 @@ describe "bundle update" do end it "it unlocks the source when submodules are removed from git source" do - pending "This would require actually removing the submodule from the clone" install_gemfile <<-G, :expect_err => true git "#{lib_path("has_submodule-1.0")}", :submodules => true do gem "has_submodule" |