aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-11-05 22:06:20 -0600
committerJack Nagel2013-11-05 22:06:20 -0600
commit778ebdef10a5f734b3f91feeff92a9c9535bd289 (patch)
tree34b2f91ef383d9145a099489b8edd5da70fef40f /Library
parent0140bc821c1bbae0446998082eb6d19ccd1cf631 (diff)
downloadhomebrew-778ebdef10a5f734b3f91feeff92a9c9535bd289.tar.bz2
Add git.sv.gnu.org repositories to shallow-clone whitelist
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/deja-gnu.rb2
-rw-r--r--Library/Formula/guile.rb2
-rw-r--r--Library/Homebrew/download_strategy.rb8
3 files changed, 9 insertions, 3 deletions
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?