From d4311fd49fe298513d71b269763f33e4f8069ba3 Mon Sep 17 00:00:00 2001 From: Mike McQuaid <mike@mikemcquaid.com> Date: Thu, 29 Sep 2016 09:16:15 +0100 Subject: [PATCH] update.sh: use sort instead of git tag --sort. Older versions of Git don't have this flag and we don't want to block updates for them when there's a (relatively) simple workaround. --- Library/Homebrew/cmd/update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index 54eca13765..5c72c24f96 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -217,7 +217,8 @@ merge_or_rebase() { if [[ "$DIR" = "$HOMEBREW_REPOSITORY" && -n "$HOMEBREW_UPDATE_TO_TAG" ]] then - UPSTREAM_TAG="$(git tag --list --sort=-version:refname | + UPSTREAM_TAG="$(git tag --list | + sort --field-separator=. --key=1,1nr -k 2,2nr -k 3,3nr | grep --max-count=1 '^[0-9]*\.[0-9]*\.[0-9]*$')" else UPSTREAM_TAG="" -- GitLab