aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHomu <homu@barosl.com>2016-06-28 04:02:43 +0900
committerHomu <homu@barosl.com>2016-06-28 04:02:43 +0900
commit5e88c8d494d40157dd1ec9b34be8aafe68431a90 (patch)
tree7551500aedfdd6d277634fe82dc1dbb246eb8434 /lib
parentb44d763965d3551a734a57fd828d13f9908d0bad (diff)
parent31ad5f7c6b853c3d391749128f81bde7d904442a (diff)
downloadbundler-5e88c8d494d40157dd1ec9b34be8aafe68431a90.tar.gz
Auto merge of #4717 - bundler:seg-deinit-submodules, r=indirect
[GitProxy] Deinit submodules if they are not requested
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/source/git/git_proxy.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/source/git/git_proxy.rb b/lib/bundler/source/git/git_proxy.rb
index 9b0e95d1..84d7fee6 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"
+ elsif Gem::Version.create(version) >= Gem::Version.create("2.9.0")
+ git_retry "submodule deinit --all"
+ end
end
end