From 9c7b3b02ce3d6f007894e2b7137772d42a75c772 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 13 Jun 2015 18:33:29 +0100 Subject: [PATCH] test-bot: always do a `git clean -ffdx` This ensures that all nested Git repositories (e.g. taps) are also deleted. Previously this wasn't needed as we could just rely on the symlinks in `Library/Formula` being missing but since Xu's good work this inadvertedly made the bot's `brew uses foo` start showing things from taps we hadn't previously deleted. --- Library/Homebrew/cmd/test-bot.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/cmd/test-bot.rb b/Library/Homebrew/cmd/test-bot.rb index 0161d77e60..e03a0191f0 100644 --- a/Library/Homebrew/cmd/test-bot.rb +++ b/Library/Homebrew/cmd/test-bot.rb @@ -553,8 +553,7 @@ module Homebrew git "rebase", "--abort" git "reset", "--hard" git "checkout", "-f", "master" - git "clean", "-fdx" - git "clean", "-ffdx" unless $?.success? + git "clean", "-ffdx" pr_locks = "#{HOMEBREW_REPOSITORY}/.git/refs/remotes/*/pr/*/*.lock" Dir.glob(pr_locks) {|lock| FileUtils.rm_rf lock } end @@ -564,8 +563,7 @@ module Homebrew checkout_args = [] if ARGV.include? '--cleanup' - git "clean", "-fdx" - test "git", "clean", "-ffdx" unless $?.success? + test "git", "clean", "-ffdx" checkout_args << "-f" end