pull: fix ambiguity issues for tap migrations

`Formula[name]` gets called with an unqualified name and thus will throw
`TapFormulaAmbiguityError` exceptions (silently ignored) if both the old
and the new tap are present and changes for the new tap are pulled
before the migrated formulae are removed from the old tap.

The result is an empty or incomplete `changed_formulae`, causing issues
with pulling the corresponding bottles and possibly other problems, too.
This commit is contained in:
Martin Afanasjew 2016-02-03 00:36:48 +01:00
parent 18668ce24e
commit 5b89c33cac

View File

@ -100,7 +100,7 @@ module Homebrew
"git", "diff-tree", "-r", "--name-only",
"--diff-filter=AM", revision, "HEAD", "--", tap.formula_dir.to_s
).each_line do |line|
name = File.basename(line.chomp, ".rb")
name = "#{tap.name}/#{File.basename(line.chomp, ".rb")}"
begin
changed_formulae << Formula[name]