Skip to content
Snippets Groups Projects
Commit facb82e4 authored by Tim D. Smith's avatar Tim D. Smith
Browse files

Shows time since last commit in brew config

Closes Homebrew/homebrew#32936.
parent 26c76381
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment