aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorBen Muschol2017-08-26 08:25:08 -0400
committerBen Muschol2017-08-26 08:25:08 -0400
commit7b31dd606288cbd976015efde61b6a6e2eb17a38 (patch)
tree09256c526ac8989f8e1555304ef584c51cb9cb2b /Library/Homebrew
parentb351c3f3ff960f3a3a61d5738eb9e126889aac30 (diff)
downloadbrew-7b31dd606288cbd976015efde61b6a6e2eb17a38.tar.bz2
Prefer if over unless, simplify messaging
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/diagnostic.rb14
1 files changed, 4 insertions, 10 deletions
diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb
index d5f1a61f2..8108c5da0 100644
--- a/Library/Homebrew/diagnostic.rb
+++ b/Library/Homebrew/diagnostic.rb
@@ -787,19 +787,13 @@ module Homebrew
end
head = coretap_path.git_head
- return unless head && head !~ %r{refs/heads/master}
+ return if head.nil? || head =~ %r{refs/heads/master}
<<-EOS.undent
- Suspicious #{CoreTap.instance} git head found.
+ Homebrew/homebrew-core is not on the master branch
- With a non-standard head, your local version of Homebrew might not
- have all of the changes intended for the most recent release. The
- current git head is:
- #{head}
-
- Unless you have compelling reasons, consider setting the head to
- point at the master branch by running:
- git checkout master
+ Check out the master branch by running:
+ git -C "$(brew --repo homebrew/core)" checkout master
EOS
end