From 853399da445cfa4f305a9162264f7a7bdee425b2 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 5 Dec 2014 18:57:28 -0500 Subject: [PATCH] Provide VCSDownloadStrategy#head? --- Library/Homebrew/download_strategy.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 1e84bb272e..d3b72e09aa 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -66,6 +66,10 @@ class VCSDownloadStrategy < AbstractDownloadStrategy def clear_cache cached_location.rmtree if cached_location.exist? end + + def head? + resource.version.head? + end end class CurlDownloadStrategy < AbstractDownloadStrategy @@ -350,7 +354,7 @@ end class SubversionDownloadStrategy < VCSDownloadStrategy def cache_tag - resource.version.head? ? "svn-HEAD" : "svn" + head? ? "svn-HEAD" : "svn" end def repo_valid?