* Modify git branh check.

This commit is contained in:
caoyanyi
2022-11-28 13:29:22 +08:00
parent 3c9b13d794
commit b5c140fa52
+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;