diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-01 23:29:38 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-01 23:29:38 +0000 |
commit | be7b5929126cb3e696ef222339237faba9b8fe5a () | |
tree | 51eae376f93c09bc82dde5a657a91df2c89062e4 /lib/bundler/source/git | |
parent | ae49dbd392083f69026f2a0fff4a1d5f42d172a7 (diff) |
Update bundled bundler to 1.16.0.
* lib/bundler, spec/bundler: Merge bundler-1.16.0. * common.mk: rspec examples of bundler-1.16.0 needs require option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/bundler/source/git/git_proxy.rb | 25 |
1 files changed, 15 insertions, 10 deletions
@@ -1,4 +1,5 @@ # frozen_string_literal: true require "shellwords" require "tempfile" module Bundler @@ -62,7 +63,7 @@ module Bundler begin @revision ||= find_local_revision rescue GitCommandError - raise MissingGitRevisionError.new(ref, uri) end @revision @@ -90,18 +91,21 @@ module Bundler end def checkout - if path.exist? - return if has_revision_cached? - Bundler.ui.info "Fetching #{URICredentialsFilter.credential_filtered_uri(uri)}" - in_path do - git_retry %(fetch --force --quiet --tags #{uri_escaped_with_configured_credentials} "refs/heads/*:refs/heads/*") - end - else - Bundler.ui.info "Fetching #{URICredentialsFilter.credential_filtered_uri(uri)}" SharedHelpers.filesystem_access(path.dirname) do |p| FileUtils.mkdir_p(p) end git_retry %(clone #{uri_escaped_with_configured_credentials} "#{path}" --bare --no-hardlinks --quiet) end end @@ -149,7 +153,7 @@ module Bundler end def git_retry(command) - Bundler::Retry.new("`git #{command}`", GitNotAllowedError).attempts do git(command) end end @@ -217,6 +221,7 @@ module Bundler def in_path(&blk) checkout unless path.exist? SharedHelpers.chdir(path, &blk) end |