diff options
author | David RodrÃguez <[email protected]> | 2022-12-24 20:42:50 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2022-12-25 05:55:36 +0900 |
commit | 8f05e4f54bdb3bcf05574bd5f12e56f7e010c8a2 () | |
tree | f84580ebe619c61036604163ca17aa33a141fda2 /lib/bundler/source/git | |
parent | 3cbe37bd357464c0ce665770998b691cad022a24 (diff) |
Update Bundler to 2.4.1 & and RubyGems to 3.4.1
Notes: Merged: https://.com/ruby/ruby/pull/7020
-rw-r--r-- | lib/bundler/source/git/git_proxy.rb | 31 |
1 files changed, 17 insertions, 14 deletions
@@ -58,6 +58,7 @@ module Bundler @explicit_ref = branch || tag || ref @revision = revision @git = git end def revision @@ -116,7 +117,7 @@ module Bundler end end - git "fetch", "--force", "--quiet", *extra_fetch_args, :dir => destination git "reset", "--hard", @revision, :dir => destination @@ -185,11 +186,16 @@ module Bundler end def refspec - return ref if pinned_to_full_sha? - ref_to_fetch = @revision || fully_qualified_ref - ref_to_fetch ||= if ref.include?("~") ref.split("~").first elsif ref.start_with?("refs/") ref @@ -197,7 +203,7 @@ module Bundler "refs/*" end - "#{ref_to_fetch}:#{ref_to_fetch}" end def fully_qualified_ref @@ -218,10 +224,6 @@ module Bundler ref =~ /\A\h{40}\z/ end - def legacy_locked_revision? - [email protected]? && @revision =~ /\A\h{7}\z/ - end - def git_null(*command, dir: nil) check_allowed(command) @@ -241,9 +243,9 @@ module Bundler out, err, status = capture(command, dir) - Bundler.ui.warn err unless err.empty? - raise GitCommandError.new(command_with_no_credentials, dir || SharedHelpers.pwd, out) unless status.success? out end @@ -344,9 +346,10 @@ module Bundler end def extra_clone_args - return [] if full_clone? - args = ["--depth", depth.to_s, "--single-branch"] args.unshift("--no-tags") if supports_cloning_with_no_tags? args += ["--branch", branch || tag] if branch || tag @@ -361,7 +364,7 @@ module Bundler def extra_fetch_args extra_args = [path.to_s, *depth_args] - extra_args.push(revision) unless legacy_locked_revision? extra_args end |