aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-02-28 18:32:29 -0600
committerJack Nagel2012-02-28 18:35:09 -0600
commit6bcd44fe6283e5cb81d7a6b0cd337ae86220bf7d (patch)
tree87091503b184828104847e51495bc10d19b1f28c /Library
parentb67afd33fc6dc12854f92abce3c79952ea295d5c (diff)
downloadhomebrew-6bcd44fe6283e5cb81d7a6b0cd337ae86220bf7d.tar.bz2
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 <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 850e72ac7..8b8fcd7c5 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