aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-05-07 19:22:21 -0500
committerJack Nagel2013-05-07 19:45:10 -0500
commit14bc883750820af1dce3c67d5d2236422e1aee96 (patch)
tree1e18cc5833a9d38e5e3be49f1bee59a2289ce8b8 /Library
parent66489b70d780aa96660aeda37a89d594f38e455f (diff)
downloadbrew-14bc883750820af1dce3c67d5d2236422e1aee96.tar.bz2
doctor: update git version check
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/doctor.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 260a8c2af..ba4e162ea 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -1,4 +1,5 @@
require 'cmd/missing'
+require 'version'
class Volumes
def initialize
@@ -916,13 +917,14 @@ def check_for_leopard_ssl
end
def check_git_version
- # see https://github.com/blog/642-smart-http-support
+ # https://help.github.com/articles/https-cloning-errors
return unless which "git"
- `git --version`.chomp =~ /git version (\d)\.(\d)\.(\d)/
- if $2.to_i < 6 or $2.to_i == 6 and $3.to_i < 6 then <<-EOS.undent
+ `git --version`.chomp =~ /git version ((?:\d+\.?)+)/
+
+ if Version.new($1) < Version.new("1.7.10") then <<-EOS.undent
An outdated version of Git was detected in your PATH.
- Git 1.6.6 or newer is required to perform checkouts over HTTP from GitHub.
+ Git 1.7.10 or newer is required to perform checkouts over HTTPS from GitHub.
Please upgrade: brew upgrade git
EOS
end