From 0480411c6fbf858c704f94fc9ddaa5196ee6a40d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Tue, 27 May 2025 16:35:50 +0000 Subject: [PATCH] use conditional assignment operator Co-authored-by: Bo Anderson --- Library/Homebrew/tap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index 3f0760e43f..1e577fe688 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -600,7 +600,7 @@ class Tap safe_system "git", "-C", path, *args git_repository.set_head_origin_auto - current_upstream_head = git_repository.origin_branch_name if current_upstream_head.nil? + current_upstream_head ||= git_repository.origin_branch_name new_upstream_head = T.must(git_repository.origin_branch_name) return if new_upstream_head == current_upstream_head