diff options
| author | Jack Nagel | 2015-02-14 16:32:24 -0500 |
|---|---|---|
| committer | Jack Nagel | 2015-02-14 16:32:24 -0500 |
| commit | 359e972d4a75182ace2557e94d1a586ae66e7ad7 (patch) | |
| tree | 1c455d8ea1120aa718fcbce57e854cb7b59910da /Library/Homebrew | |
| parent | 5cd80996e9fb766b6241b861d49d7dd52a36026c (diff) | |
| download | homebrew-359e972d4a75182ace2557e94d1a586ae66e7ad7.tar.bz2 | |
Stage entire git repo into build directory
Closes #27193.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 14 |
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 |
