From 80313c88c86d1b9a83b4734ddb58959a88879854 Mon Sep 17 00:00:00 2001 From: Thomas Keller Date: Thu, 2 Jun 2011 00:22:00 +0200 Subject: [PATCH] Properly reverse-sort git's tag list again; the rsort on the original output of the command looked bogus: since each tag ref is prefixed by an iso date and since commit 94da55d1 by hash, the whole string was of course sorted by this date and later hash, but not the tag name. This should now make more sense. --- src/IDF/Scm/Git.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/IDF/Scm/Git.php b/src/IDF/Scm/Git.php index eb2b35e..9f3e03d 100644 --- a/src/IDF/Scm/Git.php +++ b/src/IDF/Scm/Git.php @@ -218,15 +218,15 @@ class IDF_Scm_Git extends IDF_Scm $cmd, $return, implode("\n", $out))); } - rsort($out); $res = array(); foreach ($out as $b) { $elts = explode(' ', $b, 2); $tag = substr(trim($elts[1]), 10); // Remove refs/tags/ prefix $res[$tag] = ''; } + krsort($res); $this->cache['tags'] = $res; - + return $res; }