Skip to content

Commit

Permalink
cmd/config: limit tap info output
Browse files Browse the repository at this point in the history
We really only need to see info that is surprising or out of the norm.
For that reason, we can skip showing the tap remote and the tap branch
if they are what we expect them to be.
  • Loading branch information
apainintheneck committed Dec 22, 2023
1 parent 0b804d4 commit 857ab13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Library/Homebrew/system_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ def dump_tap_config(tap, out = $stdout)
end

if tap.installed?
out.puts "#{tap_name} origin: #{tap.remote}"
out.puts "#{tap_name} origin: #{tap.remote}" if tap.remote != tap.default_remote
out.puts "#{tap_name} HEAD: #{tap.git_head || "(none)"}"
out.puts "#{tap_name} last commit: #{tap.git_last_commit || "never"}"
out.puts "#{tap_name} branch: #{tap.git_branch || "(none)"}"
out.puts "#{tap_name} branch: #{tap.git_branch || "(none)"}" if tap.git_branch != "master"
end

if (json_file = Homebrew::API::HOMEBREW_CACHE_API/json_file_name) && json_file.exist?
Expand Down

0 comments on commit 857ab13

Please sign in to comment.