Platformsh\Cli\Helper\GitHelper::remoteBranchExists PHP Method

remoteBranchExists() public method

Check whether a branch exists on a remote.
public remoteBranchExists ( string $remote, string $branchName, null $dir = null, boolean $mustRun = false ) : boolean
$remote string
$branchName string
$dir null
$mustRun boolean
return boolean
    public function remoteBranchExists($remote, $branchName, $dir = null, $mustRun = false)
    {
        $args = ['ls-remote', $remote, $branchName];
        $result = $this->execute($args, $dir, $mustRun);
        return is_string($result) && strlen(trim($result));
    }