brew-test-bot: use path-limited diff

This commit is contained in:
Jack Nagel 2014-06-15 11:24:24 -05:00
parent 4e29bab683
commit a57e49db39

View File

@ -247,14 +247,14 @@ class Test
return unless diff_start_sha1 != diff_end_sha1
return if @url and not steps.last.passed?
diff_stat = git "diff", "#{diff_start_sha1}..#{diff_end_sha1}", "--name-status"
diff_stat = git "diff-tree", "-r", "--name-status",
diff_start_sha1, diff_end_sha1, "--", "Library/Formula"
diff_stat.each_line do |line|
status, filename = line.split
# Don't try and do anything to removed files.
if (status == 'A' or status == 'M')
if filename.match /Formula\/.+\.rb$/
@formulae << File.basename(filename, '.rb')
end
if status == "A" || status == "M"
@formulae << File.basename(filename, ".rb")
end
end
end