Only clone with a depth when targeting HEAD or a tag.
Closes Homebrew/homebrew#7101. Signed-off-by: Max Howell <max@methylblue.com>
This commit is contained in:
parent
0822907d6d
commit
f54a30a534
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user