Merge pull request #723 from MikeMcQuaid/diagnostic-HEAD

diagnostic: don't barf if HEAD is also a file.
This commit is contained in:
Mike McQuaid 2016-08-17 08:35:35 +01:00 committed by GitHub
commit daae44e190

View File

@ -1010,7 +1010,7 @@ module Homebrew
return unless Utils.git_available?
timestamp = if File.directory?("#{HOMEBREW_REPOSITORY}/.git")
HOMEBREW_REPOSITORY.cd { `git log -1 --format="%ct" HEAD`.to_i }
HOMEBREW_REPOSITORY.cd { `git log -1 --format="%ct" HEAD --`.to_i }
else
HOMEBREW_LIBRARY.mtime.to_i
end