diff options
| author | Jay Soffian | 2014-03-05 11:47:11 -0500 |
|---|---|---|
| committer | Mike McQuaid | 2014-03-06 20:02:04 +0000 |
| commit | 46b1bfe98013f8dea7ceedb2fd8dfe272fe74af1 (patch) | |
| tree | 2a83c54f45402ac576b56fe6a57bfcfecf52f394 | |
| parent | 39e6c147585a24d976545615ecd0f3ba964153da (diff) | |
| download | homebrew-46b1bfe98013f8dea7ceedb2fd8dfe272fe74af1.tar.bz2 | |
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 <mike@mikemcquaid.com>
| -rw-r--r-- | Library/Formula/git.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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}", |
