Merge branch 'cyy_repo' into 'master'

* Modify git branh check.

See merge request easycorp/zentaopms!6393
This commit is contained in:
王怡栋
2022-11-28 08:38:14 +00:00
+3 -1
View File
@@ -28,7 +28,9 @@ class GitRepo
if($branch)
{
$branches = $this->branch();
if(isset($branches[$branch])) $branch = "origin/$branch";
$cmd = escapeCmd("$this->client branch -r");
execCmd($cmd . ' 2>&1', 'string', $result);
if(isset($branches[$branch]) and !empty($result)) $branch = "origin/$branch";
}
$this->branch = $branch;
$this->repo = $repo;