From 46b1bfe98013f8dea7ceedb2fd8dfe272fe74af1 Mon Sep 17 00:00:00 2001 From: Jay Soffian Date: Wed, 5 Mar 2014 11:47:11 -0500 Subject: git: fix --HEAD builds to report proper version For the GIT-VERSION-FILE scripts to work properly, it either needs to have $GIT_DIR pointing to the '.git' directory or find '.git' within the cwd. Further, for `git describe` to work correctly, we can't use a shallow clone (at least not one of depth 1), as it needs to find a tag within recent history. Closes #27227. Signed-off-by: Mike McQuaid --- Library/Formula/git.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Library/Formula') diff --git a/Library/Formula/git.rb b/Library/Formula/git.rb index 0882ad153..6179b2009 100644 --- a/Library/Formula/git.rb +++ b/Library/Formula/git.rb @@ -4,7 +4,7 @@ class Git < Formula homepage 'http://git-scm.com' url 'https://git-core.googlecode.com/files/git-1.9.0.tar.gz' sha1 'e60667fc16e5a5f1cde46616b0458cc802707743' - head 'https://github.com/git/git.git' + head 'https://github.com/git/git.git', :shallow => false bottle do sha1 "78bb720052e624b889b7c39e47ec40e463fa13b0" => :mavericks @@ -60,6 +60,8 @@ class Git < Formula ENV['NO_GETTEXT'] = '1' unless build.with? 'gettext' + ENV['GIT_DIR'] = cached_download/".git" if build.head? + system "make", "prefix=#{prefix}", "sysconfdir=#{etc}", "CC=#{ENV.cc}", -- cgit v1.2.3