aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-02-17 15:41:24 -0600
committerJack Nagel2013-02-17 15:41:24 -0600
commit18bfb4310b9f33c1dbf9fddbc8f35ceb9e8f0f8d (patch)
treedd6db51142d548819ce6321f4863531b6316d7c9 /Library
parentfc0ce006fe5d73a620d7b3713216e9cd0be52e0b (diff)
downloadhomebrew-18bfb4310b9f33c1dbf9fddbc8f35ceb9e8f0f8d.tar.bz2
GitDownloadStrategy: generalize has_tag? to has_ref?
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index cbfb00254..6927079ed 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -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