Merge pull request #4840 from MikeMcQuaid/minimum-git-version
Update minimum Git version.
This commit is contained in:
commit
6fe61a00d0
@ -96,10 +96,8 @@ then
|
|||||||
HOMEBREW_FORCE_BREWED_CURL="1"
|
HOMEBREW_FORCE_BREWED_CURL="1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# The system Git is too old for some GitHub's SSL ciphers on older
|
# The system Git is too old for some Homebrew functionality we rely on.
|
||||||
# macOS versions.
|
if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "101200" ]]
|
||||||
# https://github.com/blog/2507-weak-cryptographic-standards-removed
|
|
||||||
if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "100900" ]]
|
|
||||||
then
|
then
|
||||||
HOMEBREW_FORCE_BREWED_GIT="1"
|
HOMEBREW_FORCE_BREWED_GIT="1"
|
||||||
fi
|
fi
|
||||||
|
@ -559,16 +559,16 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
def check_git_version
|
def check_git_version
|
||||||
# https://help.github.com/articles/https-cloning-errors
|
# System Git version on macOS Sierra.
|
||||||
|
minimum_version = "2.14.3".freeze
|
||||||
return unless Utils.git_available?
|
return unless Utils.git_available?
|
||||||
return unless Version.create(Utils.git_version) < Version.create("1.8.5")
|
return if Version.create(Utils.git_version) >= Version.create(minimum_version)
|
||||||
|
|
||||||
git = Formula["git"]
|
git = Formula["git"]
|
||||||
git_upgrade_cmd = git.any_version_installed? ? "upgrade" : "install"
|
git_upgrade_cmd = git.any_version_installed? ? "upgrade" : "install"
|
||||||
<<~EOS
|
<<~EOS
|
||||||
An outdated version (#{Utils.git_version}) of Git was detected in your PATH.
|
An outdated version (#{Utils.git_version}) of Git was detected in your PATH.
|
||||||
Git 1.8.5 or newer is required to perform checkouts over HTTPS from GitHub and
|
Git #{minimum_version} or newer is required for Homebrew.
|
||||||
to support the 'git -C <path>' option.
|
|
||||||
Please upgrade:
|
Please upgrade:
|
||||||
brew #{git_upgrade_cmd} git
|
brew #{git_upgrade_cmd} git
|
||||||
EOS
|
EOS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user