mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
brew-test-bot: use git to do the diff filtering
This commit is contained in:
parent
845c4b7f2f
commit
6cad17caef
@ -252,15 +252,11 @@ class Test
|
||||
return unless diff_start_sha1 != diff_end_sha1
|
||||
return if @url and not steps.last.passed?
|
||||
|
||||
diff_stat = git "diff-tree", "-r", "--name-status",
|
||||
git(
|
||||
"diff-tree", "-r", "--name-only", "--diff-filter=AM",
|
||||
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" || status == "M"
|
||||
@formulae << File.basename(filename, ".rb")
|
||||
end
|
||||
).each_line do |line|
|
||||
@formulae << File.basename(line.chomp, ".rb")
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user