aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2016-09-26 15:07:15 +0100
committerGitHub2016-09-26 15:07:15 +0100
commit11293bc3c8ee9abf146e0fae6846ea1435c9ec46 (patch)
treea1e490152e636e66dc296779ffa9746e3273ee72
parent94ed397e6251cf963d22f4c73521610d10bd319a (diff)
parent2405c3e205813fa49fc0b8264da92da8761bbf83 (diff)
downloadbrew-11293bc3c8ee9abf146e0fae6846ea1435c9ec46.tar.bz2
Merge pull request #1152 from MikeMcQuaid/doctor-remove-outdated-check
doctor: remove outdated Homebrew check.
-rw-r--r--Library/Homebrew/cmd/doctor.rb1
-rw-r--r--Library/Homebrew/diagnostic.rb25
2 files changed, 0 insertions, 26 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 8dd78bf1a..89f32dc25 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -22,7 +22,6 @@ module Homebrew
slow_checks = %w[
check_for_broken_symlinks
check_missing_deps
- check_for_outdated_homebrew
check_for_linked_keg_only_brews
]
methods = (checks.all.sort - slow_checks) + slow_checks
diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb
index 743c653d2..ca8ade9ff 100644
--- a/Library/Homebrew/diagnostic.rb
+++ b/Library/Homebrew/diagnostic.rb
@@ -961,31 +961,6 @@ module Homebrew
EOS
end
- def check_for_outdated_homebrew
- return unless Utils.git_available?
-
- timestamp = if File.directory?("#{HOMEBREW_REPOSITORY}/.git")
- HOMEBREW_REPOSITORY.cd { `git log -1 --format="%ct" HEAD --`.to_i }
- else
- HOMEBREW_LIBRARY.mtime.to_i
- end
- return if Time.now.to_i - timestamp <= 60 * 60 * 24 # 24 hours
-
- if File.directory?("#{HOMEBREW_REPOSITORY}/.git")
- HOMEBREW_REPOSITORY.cd do
- local = `git rev-parse -q --verify refs/remotes/origin/master`.chomp
- remote = /^([a-f0-9]{40})/.match(`git ls-remote origin refs/heads/master 2>/dev/null`)
- return if remote.nil? || local == remote[0]
- end
- end
-
- <<-EOS.undent
- Your Homebrew is outdated.
- You haven't updated for at least 24 hours. This is a long time in brewland!
- To update Homebrew, run `brew update`.
- EOS
- end
-
def check_for_unlinked_but_not_keg_only
unlinked = Formula.racks.reject do |rack|
if !(HOMEBREW_LINKED_KEGS/rack.basename).directory?