aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2014-12-05 18:57:28 -0500
committerJack Nagel2014-12-05 18:57:28 -0500
commit853399da445cfa4f305a9162264f7a7bdee425b2 (patch)
tree0f4fe032b87ef7959720fc3ad0c539fb40026551
parent68a5268aef12ae684550157f635fadff16c94e8c (diff)
downloadbrew-853399da445cfa4f305a9162264f7a7bdee425b2.tar.bz2
Provide VCSDownloadStrategy#head?
-rw-r--r--Library/Homebrew/download_strategy.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 1e84bb272..d3b72e09a 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?