diff options
| author | Ben Burkert | 2011-08-19 11:08:46 -0700 |
|---|---|---|
| committer | Max Howell | 2011-08-26 14:31:49 +0100 |
| commit | f54a30a534525df48af6396a90a5729c8bc8618b (patch) | |
| tree | e2a54e1f8a87baf3b9ae9673e2a607f3b7bc1434 /Library | |
| parent | 0822907d6d7452f2b7af093bc193d01b489478d7 (diff) | |
| download | brew-f54a30a534525df48af6396a90a5729c8bc8618b.tar.bz2 | |
Only clone with a depth when targeting HEAD or a tag.
Closes Homebrew/homebrew#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 |
