Right now this code only produces false positives. When we have real
support for renames, we can implement it more carefully.
ClosesHomebrew/homebrew#31126.
There is always a git executable on PATH due to the git wrapper in
Library/Contributions/cmd. The wrapper will notify the user if there is
not a real git installed.
When a `brew update` pulls down additions to tap_migrations.rb and the
removed formulae in the same update, the migrations will never run,
because tap_migrations.rb is loaded before the update takes place. Fix
this by loading it after the update.
When a formula is removed from core and installed let's tap it so users
can get updates without caring which tap we want to put things in.
This should allow us to migrate a lot of things to taps.
ClosesHomebrew/homebrew#23760.
A tapped formula is a ruby file present:
- in the root of the tap
- in directory of the tap called Formula
- in a directory of the tap called HomebrewFormula
And nowhere else. This corrects an overzealous definition of tapped
formula in the updater. (the correct definition has been in Pathname
since e613cbe5783cea2abb8100b56c22126a1ab6b9f2)
Refs Homebrew/homebrew#19743.
ClosesHomebrew/homebrew#21087.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Under certain conditions, `brew update` will show doubles. It's a rare
edge-case, but if you have a tap where the name of the formula is identical
with the name of the insalled file, then you see output like this:
==> Updated Formulae
aalib ssh-copy-id
casperjs sshuttle
jack telemachus/anytap/brew-any-tap
mogenerator telemachus/anytap/brew-any-tap
I believe this should fix that.
ClosesHomebrew/homebrew#18495.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
'which' only returns a Pathname or nil, and doesn't care about anything
sent to stderr, so just silence it by default and combine the two
methods.
ClosesHomebrew/homebrew#12115.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Using each_cons() "works", but to report all changes correctly we need
to look at the last elements even after we've looked at the last 3
consecutive elements.
Instead, let's parse each line of the raw diff output using a regexp.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Renamed formulae will cease to display as an add/delete pair and instead
end up the in the "Renamed" section. In the future we should be able to
take this information and use it to rename existing kegs during updates,
allowing us to rename formulae without breaking upgrades.
Renaming a formula requires renaming the class, so there will be at
least one add/delete pair in the file. Thus, the similarity threshold
for detecting renames is set at 85% to allow a little bit of content
turnover without losing track of the rename.
ClosesHomebrew/homebrew#11158.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>