From cfee7fdf8f0b26aaf0abe655c112bc95412401be Mon Sep 17 00:00:00 2001 From: dingguodong Date: Thu, 22 Jul 2021 09:23:18 +0800 Subject: [PATCH] * Remove warning message for git repo. --- lib/scm/gitrepo.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/scm/gitrepo.class.php b/lib/scm/gitrepo.class.php index 550ae4e754..297adc4337 100644 --- a/lib/scm/gitrepo.class.php +++ b/lib/scm/gitrepo.class.php @@ -125,10 +125,11 @@ class GitRepo $list = execCmd($cmd . ' 2>&1', 'array', $result); if($result) return array(); + $branches = array(); foreach($list as $localBranch) { - if($localBranch[0] == '*') $localBranch = substr($localBranch, 1); + if(substr($localBranch, 0, 1) == '*') $localBranch = substr($localBranch, 1); $localBranch = trim($localBranch); if(empty($localBranch))continue;