public function getLastCommit($ref = 'master')
    {
        if ($this->isRoot()) {
            return $this->getRepository()->getCommit($ref);
        }
        $log = $this->repository->getObjectLog($this->getObject(), $ref);

        return $log[0];
    }
public function getLastCommit($ref = 'master')
    {
        if ($this->isRoot()) {
            return $this->getRepository()->getCommit($ref);
        }
        $log = $this->repository->getObjectLog($this->getObject(), $ref);

        return $log[0];
    }
public function getLastCommit ( $ ref = 'master' ) { if ( $ this -> isRoot ( ) ) { return $ this -> getRepository ( ) -> getCommit ( $ ref ) ; } $ log = $ this -> repository -> getObjectLog ( $ this -> getObject ( ) , $ ref ) ; return $ log [ 0 ] ; }
get the last commit for a given treeish, for the actual tree

@param string $ref

@throws \RuntimeException
@throws \Symfony\Component\Process\Exception\RuntimeException
@return Commit
get the last commit for a given treeish for the actual tree