Skip to content
Browse files

Only clone with a depth when targeting HEAD or a tag.

  • Loading branch information...
1 parent dd62fe7 commit 40cdd2fcaa96bcaa473b0129ceeaefacd1477d3d @benburkert benburkert committed with tmm1 Aug 19, 2011
Showing with 8 additions and 0 deletions.
  1. +8 −0 homebrew/Library/Homebrew/download_strategy.rb
View
8 homebrew/Library/Homebrew/download_strategy.rb
@@ -288,6 +288,14 @@ def cached_location
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

0 comments on commit 40cdd2f

Please sign in to comment.
Something went wrong with that request. Please try again.