aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorAlyssa Ross2016-09-22 19:26:41 +0100
committerAlyssa Ross2016-09-22 19:26:41 +0100
commitb81dcea043e2ce96371af7701f4db39b339434ee (patch)
treea454896a9cb81ee547c2427c7a098310dd3e43ad /Library/Homebrew
parent5ba04b0cc6c8d3df935ab3058a91d5cbb5dc5fb7 (diff)
downloadbrew-b81dcea043e2ce96371af7701f4db39b339434ee.tar.bz2
update-test: more accurate variable names
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/dev-cmd/update-test.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/Library/Homebrew/dev-cmd/update-test.rb b/Library/Homebrew/dev-cmd/update-test.rb
index 47c9046f2..18980b691 100644
--- a/Library/Homebrew/dev-cmd/update-test.rb
+++ b/Library/Homebrew/dev-cmd/update-test.rb
@@ -14,18 +14,18 @@
module Homebrew
def update_test
cd HOMEBREW_REPOSITORY
- start_sha1 = if commit = ARGV.value("commit")
+ start_commit = if commit = ARGV.value("commit")
commit
elsif date = ARGV.value("before")
Utils.popen_read("git", "rev-list", "-n1", "--before=#{date}", "origin/master").chomp
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
+ start_commit = Utils.popen_read("git", "rev-parse", start_commit).chomp
+ end_commit = Utils.popen_read("git", "rev-parse", "HEAD").chomp
- puts "Start commit: #{start_sha1}"
- puts "End commit: #{end_sha1}"
+ puts "Start commit: #{start_commit}"
+ puts "End commit: #{end_commit}"
mktemp("update-test") do |staging|
staging.retain! if ARGV.keep_tmp?
@@ -39,12 +39,12 @@ module Homebrew
safe_system "git", "clone", "--local", "--bare", "#{HOMEBREW_REPOSITORY}/.git", "remote.git"
safe_system "git", "config", "remote.origin.url", "#{curdir}/remote.git"
- # force push origin to end_sha1
- safe_system "git", "checkout", "-B", "master", end_sha1
+ # force push origin to end_commit
+ safe_system "git", "checkout", "-B", "master", end_commit
safe_system "git", "push", "--force", "origin", "master"
- # set test copy to start_sha1
- safe_system "git", "reset", "--hard", start_sha1
+ # set test copy to start_commit
+ safe_system "git", "reset", "--hard", start_commit
# update ENV["PATH"]
ENV["PATH"] = "#{curdir}/bin:/usr/local/bin:/usr/bin:/bin"
@@ -52,13 +52,13 @@ 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 start_sha1 != end_sha1 && start_sha1 == actual_end_sha1
+ actual_end_commit = Utils.popen_read("git", "rev-parse", "master").chomp
+ if start_commit != end_commit && start_commit == actual_end_commit
raise <<-EOS.undent
brew update didn't update master!
- Start commit: #{start_sha1}
- Expected end commit: #{end_sha1}
- Actual end commit: #{actual_end_sha1}
+ Start commit: #{start_commit}
+ Expected end commit: #{end_commit}
+ Actual end commit: #{actual_end_commit}
EOS
end
end