config: expose used Git version and path

Due to our SCM wrapper in `Library/ENV/scm/git`, lookup is a bit more
complicated than just picking the first match in `PATH`. Make debugging
easier by printing the version and path of the Git actually used by us.
This commit is contained in:
Martin Afanasjew 2016-06-13 02:54:57 +02:00
parent 324a34d8ea
commit d7b6e9bba9

View File

@ -107,6 +107,11 @@ class SystemConfig
javas.uniq.join(", ")
end
def describe_git
return "N/A" unless Utils.git_available?
"#{Utils.git_version} => #{Utils.git_path}"
end
def dump_verbose_config(f = $stdout)
f.puts "HOMEBREW_VERSION: #{HOMEBREW_VERSION}"
f.puts "ORIGIN: #{origin}"
@ -127,6 +132,7 @@ class SystemConfig
f.puts "GCC-4.0: build #{gcc_40}" if gcc_40
f.puts "GCC-4.2: build #{gcc_42}" if gcc_42
f.puts "Clang: #{clang ? "#{clang} build #{clang_build}" : "N/A"}"
f.puts "Git: #{describe_git}"
f.puts "Perl: #{describe_perl}"
f.puts "Python: #{describe_python}"
f.puts "Ruby: #{describe_ruby}"