src/Rocketeer/Services/Connections/Credentials/Modules/RepositoriesKeychain.php
protected function getRepositoryBranch()
    {
        // If we passed a branch, use it
        if ($branch = $this->getOption('branch')) {
            return $branch;
        }

        // Get branch from config, else compute the fallback
        $branch = $this->config->getContextually('vcs.branch');
        if (!$branch) {
            $fallback = $this->bash->on('local', function () {
                return $this->vcs->runSilently('currentBranch');
            });

            $fallback = $fallback ?: 'master';
            $branch = trim($fallback);
        }

        return $branch;
    }
protected function getRepositoryBranch()
    {
        // If we passed a branch, use it
        if ($branch = $this->getOption('branch')) {
            return $branch;
        }

        // Get branch from config, else compute the fallback
        $branch = $this->config->getContextually('vcs.branch');
        if (!$branch) {
            $fallback = $this->bash->on('local', function () {
                return $this->vcs->runSilently('currentBranch');
            });

            $fallback = $fallback ?: 'master';
            $branch = trim($fallback);
        }

        return $branch;
    }
protected function getRepositoryBranch ( ) { // If we passed a branch, use it if ( $ branch = $ this -> getOption ( 'branch' ) ) { return $ branch ; } // Get branch from config, else compute the fallback $ branch = $ this -> config -> getContextually ( 'vcs.branch' ) ; if ( ! $ branch ) { $ fallback = $ this -> bash -> on ( 'local' , function ( ) { return $ this -> vcs -> runSilently ( 'currentBranch' ) ; } ) ; $ fallback = $ fallback ? : 'master' ; $ branch = trim ( $ fallback ) ; } return $ branch ; }
Get the repository branch to use.

@return string
Get the repository branch to use .