From 8591250e860129e9173f93ce24905bbb1e225232 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Mon, 30 Jun 2014 19:15:03 -0500 Subject: Add a method for getting the repo HEAD --- Library/Homebrew/utils.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Library/Homebrew/utils.rb') diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 6684b3696..eae5c922e 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -112,6 +112,10 @@ module Homebrew Process.wait(pid) $?.success? end + + def self.git_head + HOMEBREW_REPOSITORY.cd { `git rev-parse --verify -q HEAD 2>/dev/null`.chuzzle } + end end def with_system_path -- cgit v1.2.3