aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2016-10-29 09:09:00 -0400
committerMike McQuaid2016-10-29 09:09:00 -0400
commit59933f5cd93ce6fe2a943940cf6b76d6a0734097 (patch)
treea07899a7c4cd0d35e8b5a10847c66918d321f123
parent8a7317aa8ff5f12067eb65e529a13490bc69deda (diff)
downloadbrew-59933f5cd93ce6fe2a943940cf6b76d6a0734097.tar.bz2
update-test: fix --to-tag failure on new tag.
Without this updating to a tag will always have the same start commit and end commit as there's been no updates to `master` since the tag was created.
-rw-r--r--Library/Homebrew/dev-cmd/update-test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/dev-cmd/update-test.rb b/Library/Homebrew/dev-cmd/update-test.rb
index 8bb0fa057..3b8dc11f9 100644
--- a/Library/Homebrew/dev-cmd/update-test.rb
+++ b/Library/Homebrew/dev-cmd/update-test.rb
@@ -32,6 +32,8 @@ module Homebrew
commit
elsif date = ARGV.value("before")
Utils.popen_read("git", "rev-list", "-n1", "--before=#{date}", "origin/master").chomp
+ elsif ARGV.include?("--to-tag")
+ Utils.popen_read("git", "tag", "--list", "--sort=-version:refname").lines[1].chomp
else
Utils.popen_read("git", "rev-parse", "origin/master").chomp
end