From a25152b5a17f17d717e1590436d4a61c6e1d1222 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 14 Feb 2014 15:31:29 -0500 Subject: GitDownloadStrategy: inline simple method --- Library/Homebrew/download_strategy.rb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 146d5ce0f..e9907cf38 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -510,6 +510,10 @@ class GitDownloadStrategy < VCSDownloadStrategy private + def support_depth? + @ref_type != :revision && SHALLOW_CLONE_WHITELIST.any? { |rx| rx === @url } + end + def git_dir @clone.join(".git") end @@ -518,14 +522,6 @@ class GitDownloadStrategy < VCSDownloadStrategy quiet_system 'git', '--git-dir', git_dir, 'rev-parse', '-q', '--verify', @ref end - def support_depth? - @ref_type != :revision and host_supports_depth? - end - - def host_supports_depth? - SHALLOW_CLONE_WHITELIST.any? { |rx| rx === @url } - end - def repo_valid? quiet_system "git", "--git-dir", git_dir, "status", "-s" end -- cgit v1.2.3