GitDownloadStrategy: generalize has_tag? to has_ref?

This commit is contained in:
Jack Nagel 2013-02-17 15:41:24 -06:00
parent f62818210d
commit 612745352d

View File

@ -356,8 +356,8 @@ class GitDownloadStrategy < AbstractDownloadStrategy
@clone.join(".git")
end
def has_tag?(tag)
quiet_system @@git, '--git-dir', git_dir, 'rev-parse', '-q', '--verify', tag
def has_ref?
quiet_system @@git, '--git-dir', git_dir, 'rev-parse', '-q', '--verify', @ref
end
def support_depth?
@ -401,7 +401,7 @@ class GitDownloadStrategy < AbstractDownloadStrategy
end
def update_repo
unless @spec == :tag && has_tag?(@ref)
unless @spec == :tag && has_ref?
quiet_safe_system @@git, 'fetch', 'origin'
end
end