From 28c706bd0994c2fb0f76c586fcaa824f698d0299 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Tue, 21 Apr 2020 03:48:58 +0200 Subject: [PATCH] DEV: Do less work in docker_test (#9470) * DEV: Update the working tree just once. `git pull` was effectively doing `git fetch` and `git merge FETCH_HEAD`, and only then we were checking out the desired branch/commit. This change will skip the the merge step. * DEV: Don't run lefthook in docker_test --- script/docker_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/docker_test.rb b/script/docker_test.rb index 445901b8517..3696a53159b 100644 --- a/script/docker_test.rb +++ b/script/docker_test.rb @@ -26,10 +26,10 @@ unless ENV['NO_UPDATE'] run_or_fail("git reset --hard") - run_or_fail("git pull") + run_or_fail("git fetch") - checkout = ENV['COMMIT_HASH'] || "HEAD" - run_or_fail("git checkout #{checkout}") + checkout = ENV['COMMIT_HASH'] || "FETCH_HEAD" + run_or_fail("LEFTHOOK=0 git checkout #{checkout}") puts "travis_fold:end:pulling_latest_discourse" if ENV["TRAVIS"] puts "travis_fold:start:bundle" if ENV["TRAVIS"]