mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Hide main
branches from brew tap-info
and brew info
These are basically as "default" as `master` now so we can hide them.
This commit is contained in:
parent
29e7229463
commit
af997ea2ad
@ -63,6 +63,8 @@ module Homebrew
|
|||||||
puts info
|
puts info
|
||||||
else
|
else
|
||||||
info = ""
|
info = ""
|
||||||
|
default_branches = %w[main master].freeze
|
||||||
|
|
||||||
taps.each_with_index do |tap, i|
|
taps.each_with_index do |tap, i|
|
||||||
puts unless i.zero?
|
puts unless i.zero?
|
||||||
info = "#{tap}: "
|
info = "#{tap}: "
|
||||||
@ -79,7 +81,7 @@ module Homebrew
|
|||||||
info += "\norigin: #{tap.remote}" if tap.remote != tap.default_remote
|
info += "\norigin: #{tap.remote}" if tap.remote != tap.default_remote
|
||||||
info += "\nHEAD: #{tap.git_head || "(none)"}"
|
info += "\nHEAD: #{tap.git_head || "(none)"}"
|
||||||
info += "\nlast commit: #{tap.git_last_commit || "never"}"
|
info += "\nlast commit: #{tap.git_last_commit || "never"}"
|
||||||
info += "\nbranch: #{tap.git_branch || "(none)"}" if tap.git_branch != "master"
|
info += "\nbranch: #{tap.git_branch || "(none)"}" if default_branches.exclude?(tap.git_branch)
|
||||||
else
|
else
|
||||||
info += "Not installed"
|
info += "Not installed"
|
||||||
end
|
end
|
||||||
|
@ -128,7 +128,8 @@ module SystemConfig
|
|||||||
out.puts "#{tap_name} origin: #{tap.remote}" if tap.remote != tap.default_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} HEAD: #{tap.git_head || "(none)"}"
|
||||||
out.puts "#{tap_name} last commit: #{tap.git_last_commit || "never"}"
|
out.puts "#{tap_name} last commit: #{tap.git_last_commit || "never"}"
|
||||||
out.puts "#{tap_name} branch: #{tap.git_branch || "(none)"}" if tap.git_branch != "master"
|
default_branches = %w[main master].freeze
|
||||||
|
out.puts "#{tap_name} branch: #{tap.git_branch || "(none)"}" if default_branches.exclude?(tap.git_branch)
|
||||||
end
|
end
|
||||||
|
|
||||||
if (json_file = Homebrew::API::HOMEBREW_CACHE_API/json_file_name) && json_file.exist?
|
if (json_file = Homebrew::API::HOMEBREW_CACHE_API/json_file_name) && json_file.exist?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user