public function getCurrentBranch()
    {
        /** @var $result CallResult */
        $result = $this->getGit()->{'rev-parse'}($this->getRepositoryPath(), array(
            '--symbolic-full-name',
            '--abbrev-ref',
            'HEAD'
        ));
        $result->assertSuccess(
            sprintf('Cannot retrieve current branch from "%s"', $this->getRepositoryPath())
        );

        return $result->getStdOut();
    }
public function getCurrentBranch()
    {
        /** @var $result CallResult */
        $result = $this->getGit()->{'rev-parse'}($this->getRepositoryPath(), array(
            '--symbolic-full-name',
            '--abbrev-ref',
            'HEAD'
        ));
        $result->assertSuccess(
            sprintf('Cannot retrieve current branch from "%s"', $this->getRepositoryPath())
        );

        return $result->getStdOut();
    }
public function getCurrentBranch ( ) { /** @var $result CallResult */ $ result = $ this -> getGit ( ) -> { 'rev-parse' } ( $ this -> getRepositoryPath ( ) , array ( '--symbolic-full-name' , '--abbrev-ref' , 'HEAD' ) ) ; $ result -> assertSuccess ( sprintf ( 'Cannot retrieve current branch from "%s"' , $ this -> getRepositoryPath ( ) ) ) ; return $ result -> getStdOut ( ) ; }
Returns the name of the current branch

@return  string
Returns the name of the current branch