diff options
| author | Jack Nagel | 2014-07-11 16:12:34 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-07-11 16:15:45 -0500 |
| commit | 6cad17caef241b93fc0218e39e4f889d158c7e9c (patch) | |
| tree | 621c500770f792ae798158c07a037ff6141c16fb | |
| parent | 845c4b7f2f7e050b1495051f91b7246b8af89f4a (diff) | |
| download | brew-6cad17caef241b93fc0218e39e4f889d158c7e9c.tar.bz2 | |
brew-test-bot: use git to do the diff filtering
| -rwxr-xr-x | Library/Contributions/cmd/brew-test-bot.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb index adcaf3d19..b32de6ffd 100755 --- a/Library/Contributions/cmd/brew-test-bot.rb +++ b/Library/Contributions/cmd/brew-test-bot.rb @@ -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 |
