From da624b2f3cc3798fb18db3e348d4ed94db2f380e Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Thu, 8 Feb 2024 23:54:12 +0000 Subject: [PATCH] Don't require "branch: main" for resources with revisions set Just like when a tag is set, when a revision is set for a resource it shouldn't _also_ specify that it comes from the main branch. --- Library/Homebrew/resource_auditor.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/resource_auditor.rb b/Library/Homebrew/resource_auditor.rb index fe07821a8d..de861cec0f 100644 --- a/Library/Homebrew/resource_auditor.rb +++ b/Library/Homebrew/resource_auditor.rb @@ -171,6 +171,7 @@ module Homebrew return if spec_name != :head return unless Utils::Git.remote_exists?(url) return if specs[:tag].present? + return if specs[:revision].present? branch = Utils.popen_read("git", "ls-remote", "--symref", url, "HEAD") .match(%r{ref: refs/heads/(.*?)\s+HEAD})&.to_a&.second