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.
This commit is contained in:
parent
cab1c09ffc
commit
80313c88c8
@ -218,13 +218,13 @@ class IDF_Scm_Git extends IDF_Scm
|
|||||||
$cmd, $return,
|
$cmd, $return,
|
||||||
implode("\n", $out)));
|
implode("\n", $out)));
|
||||||
}
|
}
|
||||||
rsort($out);
|
|
||||||
$res = array();
|
$res = array();
|
||||||
foreach ($out as $b) {
|
foreach ($out as $b) {
|
||||||
$elts = explode(' ', $b, 2);
|
$elts = explode(' ', $b, 2);
|
||||||
$tag = substr(trim($elts[1]), 10); // Remove refs/tags/ prefix
|
$tag = substr(trim($elts[1]), 10); // Remove refs/tags/ prefix
|
||||||
$res[$tag] = '';
|
$res[$tag] = '';
|
||||||
}
|
}
|
||||||
|
krsort($res);
|
||||||
$this->cache['tags'] = $res;
|
$this->cache['tags'] = $res;
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
|
Loading…
Reference in New Issue
Block a user