From 3b153820296d6e087c070440e732d661d31c283d Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 7 Mar 2015 15:02:25 +0000 Subject: [PATCH] audit: git tags should also specify revisions. --- Library/Homebrew/cmd/audit.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 2354cb3c27..dd41d9284c 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -872,6 +872,14 @@ class ResourceAuditor problem "Use of the #{$&} scheme is deprecated, pass `:using => :#{$1}` instead" end + url_strategy = DownloadStrategyDetector.detect(url) + + if using == :git || url_strategy == GitDownloadStrategy + if specs[:tag] && !specs[:revision] + problem "Git should specify :revision when a :tag is specified." + end + end + return unless using if using == :ssl3 || using == CurlSSL3DownloadStrategy @@ -898,7 +906,6 @@ class ResourceAuditor end end - url_strategy = DownloadStrategyDetector.detect(url) using_strategy = DownloadStrategyDetector.detect('', using) if url_strategy == using_strategy