From 6eb2030b220e1b7d45a32959f6024d3d7f26bd10 Mon Sep 17 00:00:00 2001 From: Adrian Ho Date: Sun, 24 Nov 2024 11:58:12 +0800 Subject: [PATCH] system_config: print brew branch --- Library/Homebrew/system_config.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Library/Homebrew/system_config.rb b/Library/Homebrew/system_config.rb index fe0556b50466d..b2f3be5ae83f6 100644 --- a/Library/Homebrew/system_config.rb +++ b/Library/Homebrew/system_config.rb @@ -34,6 +34,11 @@ def homebrew_repo GitRepository.new(HOMEBREW_REPOSITORY) end + sig { returns(String) } + def branch + homebrew_repo.branch_name || "(none)" + end + sig { returns(String) } def head homebrew_repo.head_ref || "(none)" @@ -142,6 +147,7 @@ def homebrew_config(out = $stdout) out.puts "ORIGIN: #{origin}" out.puts "HEAD: #{head}" out.puts "Last commit: #{last_commit}" + out.puts "Branch: #{branch}" end def homebrew_env_config(out = $stdout)