diff options
| author | Ben Burkert | 2011-08-19 11:08:46 -0700 |
|---|---|---|
| committer | Max Howell | 2011-08-26 14:31:49 +0100 |
| commit | 3cc8d58d925a6b0af8135ef6f1bf1d3713e25452 (patch) | |
| tree | c3acef9b5cecbd6d1553f5ee286bc67fc0b25679 /Library | |
| parent | 93f03aa278c9260b9dda7bb32206c0edf6b4ebd4 (diff) | |
| download | homebrew-3cc8d58d925a6b0af8135ef6f1bf1d3713e25452.tar.bz2 | |
Only clone with a depth when targeting HEAD or a tag.
Closes #7101.
Signed-off-by: Max Howell <max@methylblue.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 32afea120..b457fd927 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -291,6 +291,14 @@ class GitDownloadStrategy < AbstractDownloadStrategy end def support_depth? + !commit_history_required? and depth_supported_host? + end + + def commit_history_required? + @spec == :sha + end + + def depth_supported_host? @url =~ %r(git://) or @url =~ %r(https://github.com/) end |
