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

        return $log[0];
    }