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
commit612745352d960a17b4dbaaf08987959ff8370898 (patch)
tree85a84c2c4f0fb48b40cfd40d891db1cde2111776 /Library
parentf62818210d4eb010ea3c84d30b7aef299b00a6b4 (diff)
downloadbrew-612745352d960a17b4dbaaf08987959ff8370898.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