Merge pull request #12276 from samford/resource_auditor-omit-branch-error-when-using-tag

ResourceAuditor: Skip branch error when using tag
This commit is contained in:
Sam Ford 2021-10-21 14:02:27 -04:00 committed by GitHub
commit e2b609c3ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,6 +143,7 @@ module Homebrew
return unless @strict
return if spec_name != :head
return unless Utils::Git.remote_exists?(url)
return if specs[:tag].present?
branch = Utils.popen_read("git", "ls-remote", "--symref", url, "HEAD")
.match(%r{ref: refs/heads/(.*?)\s+HEAD})[1]