diff options
| author | Jack Nagel | 2014-02-14 15:31:29 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-02-14 15:33:37 -0500 |
| commit | a343405894ff9dab67644a9aec2b865e4a5ef053 (patch) | |
| tree | 749ca398f08f0a930f37ab2e356a25452395e9bc /Library | |
| parent | d225923d449c5d8eb23d8c695367284186c79a47 (diff) | |
| download | homebrew-a343405894ff9dab67644a9aec2b865e4a5ef053.tar.bz2 | |
GitDownloadStrategy: inline simple method
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 12 |
1 files changed, 4 insertions, 8 deletions
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 |
