Skip to content

Commit

Permalink
Merge pull request #18811 from gromgit/brew-branch
Browse files Browse the repository at this point in the history
system_config: print brew branch
  • Loading branch information
MikeMcQuaid authored Nov 25, 2024
2 parents 4a77cd1 + 6eb2030 commit 666601f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Library/Homebrew/system_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 666601f

Please sign in to comment.