diff options
| author | Jack Nagel | 2014-12-05 18:57:28 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-12-05 18:57:28 -0500 |
| commit | 8f31ed0757adb338f3a062712165adfdfcf66495 (patch) | |
| tree | 89fd7befe6a32b3a9b7e307843636f1ee6f3355a | |
| parent | e3d3d9374fab9cd6e25c4dda6a88f43c8a29ed02 (diff) | |
| download | homebrew-8f31ed0757adb338f3a062712165adfdfcf66495.tar.bz2 | |
Provide VCSDownloadStrategy#head?
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 6 |
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? |
