Merge pull request #4840 from MikeMcQuaid/minimum-git-version

Update minimum Git version.
This commit is contained in:
Mike McQuaid 2018-09-06 13:41:22 +01:00 committed by GitHub
commit 6fe61a00d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View File

@ -96,10 +96,8 @@ then
HOMEBREW_FORCE_BREWED_CURL="1"
fi
# The system Git is too old for some GitHub's SSL ciphers on older
# macOS versions.
# https://github.com/blog/2507-weak-cryptographic-standards-removed
if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "100900" ]]
# The system Git is too old for some Homebrew functionality we rely on.
if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "101200" ]]
then
HOMEBREW_FORCE_BREWED_GIT="1"
fi

View File

@ -559,16 +559,16 @@ module Homebrew
end
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 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_upgrade_cmd = git.any_version_installed? ? "upgrade" : "install"
<<~EOS
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
to support the 'git -C <path>' option.
Git #{minimum_version} or newer is required for Homebrew.
Please upgrade:
brew #{git_upgrade_cmd} git
EOS