aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb29
1 files changed, 2 insertions, 27 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index f94477f50..61d286da5 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -198,34 +198,9 @@ module Homebrew
_system(cmd, *args)
end
- def self.git_origin
- return unless Utils.git_available?
- HOMEBREW_REPOSITORY.cd { `git config --get remote.origin.url 2>/dev/null`.chuzzle }
- end
-
- def self.git_head
- return unless Utils.git_available?
- HOMEBREW_REPOSITORY.cd { `git rev-parse --verify -q HEAD 2>/dev/null`.chuzzle }
- end
-
- def self.git_short_head
- return unless Utils.git_available?
- HOMEBREW_REPOSITORY.cd { `git rev-parse --short=4 --verify -q HEAD 2>/dev/null`.chuzzle }
- end
-
- def self.git_last_commit
- return unless Utils.git_available?
- HOMEBREW_REPOSITORY.cd { `git show -s --format="%cr" HEAD 2>/dev/null`.chuzzle }
- end
-
- def self.git_last_commit_date
- return unless Utils.git_available?
- HOMEBREW_REPOSITORY.cd { `git show -s --format="%cd" --date=short HEAD 2>/dev/null`.chuzzle }
- end
-
def self.homebrew_version_string
- if pretty_revision = git_short_head
- last_commit = git_last_commit_date
+ if pretty_revision = HOMEBREW_REPOSITORY.git_short_head
+ last_commit = HOMEBREW_REPOSITORY.git_last_commit_date
"#{HOMEBREW_VERSION} (git revision #{pretty_revision}; last commit #{last_commit})"
else
"#{HOMEBREW_VERSION} (no git repository)"