From df9a8a3365da04b36e45e6a03ee6e08ffdfe1650 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 14 Feb 2014 15:31:29 -0500 Subject: [PATCH] GitDownloadStrategy: move constant to top of class body --- Library/Homebrew/download_strategy.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index e7e482e4bc..146d5ce0fc 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -464,6 +464,13 @@ class UnsafeSubversionDownloadStrategy < SubversionDownloadStrategy end class GitDownloadStrategy < VCSDownloadStrategy + SHALLOW_CLONE_WHITELIST = [ + %r{git://}, + %r{https://github\.com}, + %r{http://git\.sv\.gnu\.org}, + %r{http://llvm\.org}, + ] + def cache_tag; "git" end def fetch @@ -515,13 +522,6 @@ class GitDownloadStrategy < VCSDownloadStrategy @ref_type != :revision and host_supports_depth? end - SHALLOW_CLONE_WHITELIST = [ - %r{git://}, - %r{https://github\.com}, - %r{http://git\.sv\.gnu\.org}, - %r{http://llvm\.org}, - ] - def host_supports_depth? SHALLOW_CLONE_WHITELIST.any? { |rx| rx === @url } end