From 59933f5cd93ce6fe2a943940cf6b76d6a0734097 Mon Sep 17 00:00:00 2001 From: Mike McQuaid <mike@mikemcquaid.com> Date: Sat, 29 Oct 2016 09:09:00 -0400 Subject: [PATCH] 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. --- Library/Homebrew/dev-cmd/update-test.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Library/Homebrew/dev-cmd/update-test.rb b/Library/Homebrew/dev-cmd/update-test.rb index 8bb0fa0574..3b8dc11f9d 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 -- GitLab