GitDownloadStrategy: inline simple method

This commit is contained in:
Jack Nagel 2014-02-14 15:31:29 -05:00
parent df9a8a3365
commit a25152b5a1

View File

@ -510,6 +510,10 @@ class GitDownloadStrategy < VCSDownloadStrategy
private private
def support_depth?
@ref_type != :revision && SHALLOW_CLONE_WHITELIST.any? { |rx| rx === @url }
end
def git_dir def git_dir
@clone.join(".git") @clone.join(".git")
end end
@ -518,14 +522,6 @@ class GitDownloadStrategy < VCSDownloadStrategy
quiet_system 'git', '--git-dir', git_dir, 'rev-parse', '-q', '--verify', @ref quiet_system 'git', '--git-dir', git_dir, 'rev-parse', '-q', '--verify', @ref
end 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? def repo_valid?
quiet_system "git", "--git-dir", git_dir, "status", "-s" quiet_system "git", "--git-dir", git_dir, "status", "-s"
end end