Merge branch 'liyuchun_fixbug' into 'master'

* Fix bug #23945.

See merge request easycorp/zentaopms!4247
This commit is contained in:
李玉春
2022-06-30 05:18:15 +00:00
+7 -1
View File
@@ -107,6 +107,12 @@ class GitRepo
$cmd = escapeCmd("$this->client tag --sort=taggerdate");
$list = execCmd($cmd . ' 2>&1', 'array', $result);
if($result) return array();
foreach($list as $key => $tag)
{
if(!$tag) unset($list[$key]);
}
return $list;
}
@@ -139,7 +145,7 @@ class GitRepo
}
asort($branches);
$branches = array($defaultBranch => $defaultBranch) + $branches;
if($defaultBranch) $branches = array($defaultBranch => $defaultBranch) + $branches;
return $branches;
}