aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2016-08-11 11:24:03 +0100
committerMike McQuaid2016-08-11 11:26:37 +0100
commitb9d5b11f321a359b462aa2c353c2bdb483930fb3 (patch)
tree3d7203770506c8de42876eeeea65b85e8325e44a /Library
parent985c672bac4dc20d369b451c484eb6553762dbcf (diff)
downloadbrew-b9d5b11f321a359b462aa2c353c2bdb483930fb3.tar.bz2
update-test: check we end up at end commit.
This would have caught the bug fixed in 985c67.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/dev-cmd/update-test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Homebrew/dev-cmd/update-test.rb b/Library/Homebrew/dev-cmd/update-test.rb
index 621c41526..84de08a7f 100644
--- a/Library/Homebrew/dev-cmd/update-test.rb
+++ b/Library/Homebrew/dev-cmd/update-test.rb
@@ -16,6 +16,7 @@ module Homebrew
else
Utils.popen_read("git", "rev-parse", "origin/master").chomp
end
+ start_sha1 = Utils.popen_read("git", "rev-parse", start_sha1).chomp
end_sha1 = Utils.popen_read("git", "rev-parse", "HEAD").chomp
puts "Start commit: #{start_sha1}"
@@ -47,6 +48,15 @@ module Homebrew
# run brew update
oh1 "Running brew update..."
safe_system "brew", "update", "--verbose"
+ actual_end_sha1 = Utils.popen_read("git", "rev-parse", "master").chomp
+ if actual_end_sha1 != end_sha1
+ raise <<-EOS.undent
+ brew update didn't update master!
+ Start commit: #{start_sha1}
+ Expected end commit: #{end_sha1}
+ Actual end commit: #{actual_end_sha1}
+ EOS
+ end
end
end
end