From 612745352d960a17b4dbaaf08987959ff8370898 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 17 Feb 2013 15:41:24 -0600 Subject: [PATCH] GitDownloadStrategy: generalize has_tag? to has_ref? --- Library/Homebrew/download_strategy.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index cbfb002542..6927079edd 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