aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2015-02-14 16:32:24 -0500
committerJack Nagel2015-02-14 16:32:24 -0500
commit359e972d4a75182ace2557e94d1a586ae66e7ad7 (patch)
tree1c455d8ea1120aa718fcbce57e854cb7b59910da
parent5cd80996e9fb766b6241b861d49d7dd52a36026c (diff)
downloadhomebrew-359e972d4a75182ace2557e94d1a586ae66e7ad7.tar.bz2
Stage entire git repo into build directory
Closes #27193.
-rw-r--r--Library/Homebrew/download_strategy.rb14
1 files changed, 1 insertions, 13 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 40f0504a0..9406cc932 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -537,13 +537,7 @@ class GitDownloadStrategy < VCSDownloadStrategy
def stage
super
-
- dst = Dir.getwd
- cached_location.cd do
- # https://stackoverflow.com/questions/160608/how-to-do-a-git-export-like-svn-export
- safe_system 'git', 'checkout-index', '-a', '-f', "--prefix=#{dst}/"
- checkout_submodules(dst) if submodules?
- end
+ cp_r File.join(cached_location, "."), Dir.pwd
end
private
@@ -649,12 +643,6 @@ class GitDownloadStrategy < VCSDownloadStrategy
quiet_safe_system "git", "submodule", "foreach", "--recursive", "git submodule sync"
quiet_safe_system "git", "submodule", "update", "--init", "--recursive"
end
-
- def checkout_submodules(dst)
- escaped_clone_path = cached_location.to_s.gsub(/\//, '\/')
- sub_cmd = %[git checkout-index -a -f --prefix="#{dst}/${toplevel/#{escaped_clone_path}/}/$path/"]
- quiet_safe_system "git", "submodule", "foreach", "--recursive", sub_cmd
- end
end
class CVSDownloadStrategy < VCSDownloadStrategy