From 1702b34f18f1244d913482d848fd64bb7a771009 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 26 Oct 2020 12:16:35 +0000 Subject: [PATCH] update-test: improve debugging output. Output more information about the refs and commit message for the start, expected and actual end commits to ease debugging. --- Library/Homebrew/dev-cmd/update-test.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/dev-cmd/update-test.rb b/Library/Homebrew/dev-cmd/update-test.rb index c2c6b0f60b..19050451fc 100644 --- a/Library/Homebrew/dev-cmd/update-test.rb +++ b/Library/Homebrew/dev-cmd/update-test.rb @@ -114,11 +114,14 @@ module Homebrew safe_system "brew", "update", "--verbose" actual_end_commit = Utils.popen_read("git", "rev-parse", branch).chomp if actual_end_commit != end_commit + start_log = Utils.popen_read("git", "log", "-1", "--decorate", "--oneline", start_commit).chomp + end_log = Utils.popen_read("git", "log", "-1", "--decorate", "--oneline", end_commit).chomp + actual_log = Utils.popen_read("git", "log", "-1", "--decorate", "--oneline", actual_end_commit).chomp raise <<~EOS brew update didn't update #{branch}! - Start commit: #{start_commit} - Expected end commit: #{end_commit} - Actual end commit: #{actual_end_commit} + Start commit: #{start_log} + Expected end commit: #{end_log} + Actual end commit: #{actual_log} EOS end end