From d7b6e9bba92ccc5884dcb9dd0859d16e2bf3fe9c Mon Sep 17 00:00:00 2001 From: Martin Afanasjew Date: Mon, 13 Jun 2016 02:54:57 +0200 Subject: [PATCH] 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. --- Library/Homebrew/system_config.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Library/Homebrew/system_config.rb b/Library/Homebrew/system_config.rb index edd49f8e0b..71d5065ad3 100644 --- a/Library/Homebrew/system_config.rb +++ b/Library/Homebrew/system_config.rb @@ -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}"