From 6fe29922c88bbd7b4a0313ccef1d057ea125984f Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 28 Feb 2012 18:32:29 -0600 Subject: [PATCH] Set GIT_DIR when staging git clones Some build scripts want to inspect the git history, e.g. to determine version strings. Rather than copy the repository into the build tree, just setting GIT_DIR is enough for things to "just work". Signed-off-by: Jack Nagel --- Library/Homebrew/download_strategy.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 850e72ac79..8b8fcd7c5b 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -383,6 +383,7 @@ class GitDownloadStrategy < AbstractDownloadStrategy safe_system 'git', 'submodule', '--quiet', 'foreach', '--recursive', sub_cmd end end + ENV['GIT_DIR'] = cached_location+'.git' end end