aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/config.rb5
-rw-r--r--Library/Homebrew/utils.rb4
2 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/config.rb b/Library/Homebrew/cmd/config.rb
index 037294655..7996b55ce 100644
--- a/Library/Homebrew/cmd/config.rb
+++ b/Library/Homebrew/cmd/config.rb
@@ -47,6 +47,10 @@ module Homebrew
Homebrew.git_head || "(none)"
end
+ def last_commit
+ Homebrew.git_last_commit || "never"
+ end
+
def origin
origin = HOMEBREW_REPOSITORY.cd do
`git config --get remote.origin.url 2>/dev/null`.chomp
@@ -121,6 +125,7 @@ module Homebrew
f.puts "HOMEBREW_VERSION: #{HOMEBREW_VERSION}"
f.puts "ORIGIN: #{origin}"
f.puts "HEAD: #{head}"
+ f.puts "Last commit: #{last_commit}"
f.puts "HOMEBREW_PREFIX: #{HOMEBREW_PREFIX}"
f.puts "HOMEBREW_CELLAR: #{HOMEBREW_CELLAR}"
f.puts hardware
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 6dc5db45e..c8827e0d3 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -119,6 +119,10 @@ module Homebrew
def self.git_head
HOMEBREW_REPOSITORY.cd { `git rev-parse --verify -q HEAD 2>/dev/null`.chuzzle }
end
+
+ def self.git_last_commit
+ HOMEBREW_REPOSITORY.cd { `git show -s --format="%cr" HEAD 2>/dev/null`.chuzzle }
+ end
end
def with_system_path