Fixes issue with branches that start with a hash

This commit is contained in:
Stefan 2017-02-24 13:00:42 +07:00 committed by Dmitry Khomutov
parent e11a1cc3d3
commit 410e53da0b
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9

View file

@ -54,7 +54,7 @@ class RemoteGitBuild extends Build
$cmd .= ' --depth ' . intval($depth) . ' ';
}
$cmd .= ' -b %s %s "%s"';
$cmd .= ' -b "%s" "%s" "%s"';
$success = $builder->executeCommand($cmd, $this->getBranch(), $this->getCloneUrl(), $cloneTo);
if ($success) {
@ -81,7 +81,7 @@ class RemoteGitBuild extends Build
$cmd .= ' --depth ' . intval($depth) . ' ';
}
$cmd .= ' -b %s %s "%s"';
$cmd .= ' -b "%s" "%s" "%s"';
$cmd = 'export GIT_SSH="'.$gitSshWrapper.'" && ' . $cmd;
$success = $builder->executeCommand($cmd, $this->getBranch(), $this->getCloneUrl(), $cloneTo);