From 9db87fce130bdcb4831631c46fbb9d5717472af2 Mon Sep 17 00:00:00 2001 From: James Edwards-Jones Date: Fri, 7 Apr 2017 01:14:10 +0100 Subject: Protected tags changes from backend maintainer review --- app/models/protected_ref_matcher.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/models/protected_ref_matcher.rb') diff --git a/app/models/protected_ref_matcher.rb b/app/models/protected_ref_matcher.rb index 83f44240259..d970f2b01fc 100644 --- a/app/models/protected_ref_matcher.rb +++ b/app/models/protected_ref_matcher.rb @@ -4,7 +4,7 @@ class ProtectedRefMatcher end # Returns all protected refs that match the given ref name. - # This realizes all records from the scope built up so far, and does + # This checks all records from the scope built up so far, and does # _not_ return a relation. # # This method optionally takes in a list of `protected_refs` to search @@ -38,6 +38,8 @@ class ProtectedRefMatcher end def wildcard_match?(ref_name) + return false unless wildcard? + wildcard_regex === ref_name end -- cgit v1.2.1