Skip to content

Commit

Permalink
update: remove support for reporting missing refs
Browse files Browse the repository at this point in the history
Since we're fixing missing refs automatically, this codepath is no longer used.
  • Loading branch information
rrotter committed Feb 2, 2025
1 parent ebe45ec commit f304f80
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
13 changes: 0 additions & 13 deletions Library/Homebrew/cmd/update-report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -259,19 +259,6 @@ def output_update_report
link_completions_manpages_and_docs
Tap.installed.each(&:link_completions_and_manpages)

failed_fetch_dirs = ENV["HOMEBREW_MISSING_REMOTE_REF_DIRS"]&.split("\n")
if failed_fetch_dirs.present?
failed_fetch_taps = failed_fetch_dirs.map { |dir| Tap.from_path(dir) }

ofail <<~EOS
Some taps failed to update!
The following taps can not read their remote branches:
#{failed_fetch_taps.join("\n ")}
This is happening because the remote branch was renamed or deleted.
Reset taps to point to the correct remote branches by running `brew tap --repair`
EOS
end

return if new_tag.blank? || new_tag == old_tag || args.quiet?

puts
Expand Down
10 changes: 0 additions & 10 deletions Library/Homebrew/cmd/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -565,9 +565,7 @@ EOS
trap '{ /usr/bin/pkill -P $$; wait; exit 130; }' SIGINT

local update_failed_file="${HOMEBREW_REPOSITORY}/.git/UPDATE_FAILED"
local missing_remote_ref_dirs_file="${HOMEBREW_REPOSITORY}/.git/FAILED_FETCH_DIRS"
rm -f "${update_failed_file}"
rm -f "${missing_remote_ref_dirs_file}"

for DIR in "${HOMEBREW_REPOSITORY}" "${HOMEBREW_LIBRARY}"/Taps/*/*
do
Expand Down Expand Up @@ -773,13 +771,6 @@ EOS
wait
trap - SIGINT

if [[ -f "${missing_remote_ref_dirs_file}" ]]
then
HOMEBREW_MISSING_REMOTE_REF_DIRS="$(cat "${missing_remote_ref_dirs_file}")"
rm -f "${missing_remote_ref_dirs_file}"
export HOMEBREW_MISSING_REMOTE_REF_DIRS
fi

for DIR in "${HOMEBREW_REPOSITORY}" "${HOMEBREW_LIBRARY}"/Taps/*/*
do
if [[ -z "${HOMEBREW_NO_INSTALL_FROM_API}" ]] &&
Expand Down Expand Up @@ -924,7 +915,6 @@ EOS
# shellcheck disable=SC2031
if [[ -n "${HOMEBREW_UPDATED}" ]] ||
[[ -n "${HOMEBREW_UPDATE_FAILED}" ]] ||
[[ -n "${HOMEBREW_MISSING_REMOTE_REF_DIRS}" ]] ||
[[ -n "${HOMEBREW_UPDATE_FORCE}" ]] ||
[[ -n "${HOMEBREW_MIGRATE_LINUXBREW_FORMULAE}" ]] ||
[[ -d "${HOMEBREW_LIBRARY}/LinkedKegs" ]] ||
Expand Down

0 comments on commit f304f80

Please sign in to comment.