зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Fix regression on old git versions
https://github.com/rubygems/rubygems/commit/abd91ca2e5
This commit is contained in:
Родитель
7f7a7f13ed
Коммит
5b076e00ce
|
@ -131,7 +131,11 @@ module Bundler
|
||||||
end
|
end
|
||||||
|
|
||||||
ref = @commit_ref || (locked_to_full_sha? && @revision)
|
ref = @commit_ref || (locked_to_full_sha? && @revision)
|
||||||
git "fetch", "--force", "--quiet", *extra_fetch_args(ref), :dir => destination if ref
|
if ref
|
||||||
|
git "config", "uploadpack.allowAnySHA1InWant", "true", :dir => path.to_s if @commit_ref.nil? && needs_allow_any_sha1_in_want?
|
||||||
|
|
||||||
|
git "fetch", "--force", "--quiet", *extra_fetch_args(ref), :dir => destination
|
||||||
|
end
|
||||||
|
|
||||||
git "reset", "--hard", @revision, :dir => destination
|
git "reset", "--hard", @revision, :dir => destination
|
||||||
|
|
||||||
|
@ -434,6 +438,10 @@ module Bundler
|
||||||
@supports_minus_c ||= Gem::Version.new(version) >= Gem::Version.new("1.8.5")
|
@supports_minus_c ||= Gem::Version.new(version) >= Gem::Version.new("1.8.5")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def needs_allow_any_sha1_in_want?
|
||||||
|
@needs_allow_any_sha1_in_want ||= Gem::Version.new(version) <= Gem::Version.new("2.13.7")
|
||||||
|
end
|
||||||
|
|
||||||
def supports_fetching_unreachable_refs?
|
def supports_fetching_unreachable_refs?
|
||||||
@supports_fetching_unreachable_refs ||= Gem::Version.new(version) >= Gem::Version.new("2.5.0")
|
@supports_fetching_unreachable_refs ||= Gem::Version.new(version) >= Gem::Version.new("2.5.0")
|
||||||
end
|
end
|
||||||
|
|
Загрузка…
Ссылка в новой задаче