diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index b0196c0176..e10196c373 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -419,6 +419,7 @@ class Tap end $stderr.ohai "#{name}: changed remote from #{remote} to #{requested_remote}" unless quiet end + return unless remote current_upstream_head = T.must(git_repo.origin_branch_name) return if requested_remote.blank? && git_repo.origin_has_branch?(current_upstream_head)