test-bot: fix diff_formulae

* Fix regression caused by 05649cee60e5349afc328070a0c0e4f6835f97f0
* Use `Tap#formula_file?` to filter formula.
This commit is contained in:
Xu Cheng 2016-06-23 17:56:10 +08:00
parent 05649cee60
commit 66cda616d1
No known key found for this signature in database
GPG Key ID: C2A3860FA0B459CE

View File

@ -273,11 +273,11 @@ module Homebrew
def diff_formulae(start_revision, end_revision, path, filter)
return unless @tap
git(
"diff-tree", "--name-only", "--diff-filter=#{filter}",
"diff-tree", "-r", "--name-only", "--diff-filter=#{filter}",
start_revision, end_revision, "--", path
).lines.map do |line|
file = Pathname.new line.chomp
next unless file.extname == ".rb"
next unless @tap.formula_file?(file)
@tap.formula_file_to_name(file)
end.compact
end