GitDownloadStrategy: generalize has_tag? to has_ref?
This commit is contained in:
parent
f62818210d
commit
612745352d
@ -356,8 +356,8 @@ class GitDownloadStrategy < AbstractDownloadStrategy
|
|||||||
@clone.join(".git")
|
@clone.join(".git")
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_tag?(tag)
|
def has_ref?
|
||||||
quiet_system @@git, '--git-dir', git_dir, 'rev-parse', '-q', '--verify', tag
|
quiet_system @@git, '--git-dir', git_dir, 'rev-parse', '-q', '--verify', @ref
|
||||||
end
|
end
|
||||||
|
|
||||||
def support_depth?
|
def support_depth?
|
||||||
@ -401,7 +401,7 @@ class GitDownloadStrategy < AbstractDownloadStrategy
|
|||||||
end
|
end
|
||||||
|
|
||||||
def update_repo
|
def update_repo
|
||||||
unless @spec == :tag && has_tag?(@ref)
|
unless @spec == :tag && has_ref?
|
||||||
quiet_safe_system @@git, 'fetch', 'origin'
|
quiet_safe_system @@git, 'fetch', 'origin'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user