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.
This commit is contained in:
parent
a92591108d
commit
da624b2f3c
@ -171,6 +171,7 @@ module Homebrew
|
|||||||
return if spec_name != :head
|
return if spec_name != :head
|
||||||
return unless Utils::Git.remote_exists?(url)
|
return unless Utils::Git.remote_exists?(url)
|
||||||
return if specs[:tag].present?
|
return if specs[:tag].present?
|
||||||
|
return if specs[:revision].present?
|
||||||
|
|
||||||
branch = Utils.popen_read("git", "ls-remote", "--symref", url, "HEAD")
|
branch = Utils.popen_read("git", "ls-remote", "--symref", url, "HEAD")
|
||||||
.match(%r{ref: refs/heads/(.*?)\s+HEAD})&.to_a&.second
|
.match(%r{ref: refs/heads/(.*?)\s+HEAD})&.to_a&.second
|
||||||
|
Loading…
x
Reference in New Issue
Block a user