Merge branch 'liyuchun_fixbug' into 'master'
* Fix bug #23945. See merge request easycorp/zentaopms!4247
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user