cmd/update-report: fix ordering.

New formulae/casks were shown as removed and vice versa.

Fixes #15036
This commit is contained in:
Mike McQuaid 2023-03-23 08:48:48 +00:00
parent 65d858da12
commit e75b983686
No known key found for this signature in database
GPG Key ID: 3338A31AFDB1D829

View File

@ -580,7 +580,7 @@ class Reporter
@diff ||= if installed_from_api?
# Hack `git diff` output with regexes to look like `git diff-tree` output.
# Yes, I know this is a bit filthy but it saves duplicating the #report logic.
diff_output = Utils.popen_read("git", "diff", api_names_txt, api_names_before_txt)
diff_output = Utils.popen_read("git", "diff", api_names_before_txt, api_names_txt)
header_regex = /^(---|\+\+\+) /.freeze
add_delete_characters = ["+", "-"].freeze