From 778ebdef10a5f734b3f91feeff92a9c9535bd289 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 5 Nov 2013 22:06:20 -0600 Subject: Add git.sv.gnu.org repositories to shallow-clone whitelist --- Library/Formula/deja-gnu.rb | 2 +- Library/Formula/guile.rb | 2 +- Library/Homebrew/download_strategy.rb | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'Library') diff --git a/Library/Formula/deja-gnu.rb b/Library/Formula/deja-gnu.rb index c25c6e95f..56fd43a06 100644 --- a/Library/Formula/deja-gnu.rb +++ b/Library/Formula/deja-gnu.rb @@ -6,7 +6,7 @@ class DejaGnu < Formula mirror 'http://ftp.gnu.org/gnu/dejagnu/dejagnu-1.5.1.tar.gz' sha1 'eb16fb455690592a97f22acd17e8fc2f1b5c54c2' - head 'git://git.sv.gnu.org/dejagnu.git' + head 'http://git.sv.gnu.org/r/dejagnu.git' def install ENV.j1 # Or fails on Mac Pro diff --git a/Library/Formula/guile.rb b/Library/Formula/guile.rb index 634cbd48b..ab458b6e7 100644 --- a/Library/Formula/guile.rb +++ b/Library/Formula/guile.rb @@ -7,7 +7,7 @@ class Guile < Formula sha1 'fc5d770e8b1d364b2f222a8f8c96ccf740b2956f' head do - url 'git://git.sv.gnu.org/guile.git' + url 'http://git.sv.gnu.org/r/guile.git' depends_on 'automake' => :build depends_on 'gettext' => :build diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 72b4b8f03..a3e08c1f4 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -498,8 +498,14 @@ 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}, + ] + def host_supports_depth? - @url =~ %r{git://} or @url =~ %r{https://github.com/} + SHALLOW_CLONE_WHITELIST.any? { |rx| rx === @url } end def repo_valid? -- cgit v1.2.3