aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorXu Cheng2015-08-25 17:32:39 +0800
committerXu Cheng2015-08-25 17:32:39 +0800
commit1df6e5d3312590d0996b5e38f857c338f46cddc8 (patch)
tree64af8677d66e08d603d55e97cbaff71494550745 /Library
parente779be14534299a50d56affada6ab5621c51cb71 (diff)
downloadbrew-1df6e5d3312590d0996b5e38f857c338f46cddc8.tar.bz2
Formula#file_modfiled?: remove unnecessary git dir check
It's already covered by `$?.exitstatus == 0` in below.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 0e3830e1f..7ec035dd7 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -765,10 +765,8 @@ class Formula
end
def file_modified?
- # New Homebrew installs may not be a git repo yet
- return false unless File.exist? "#{HOMEBREW_PREFIX}/.git"
-
git = which("git")
+
# git isn't installed by older Xcodes
return false if git.nil?