Once one pattern matches a refname, stop checking other patterns.