Gitamin\Services\Git\Repository::hasCommit PHP Method

hasCommit() public method

Return true if the repo contains this commit.
public hasCommit ( $commitHash ) : boolean
$commitHash Hash of commit whose existence we want to check
return boolean Whether or not the commit exists in this repo
    public function hasCommit($commitHash)
    {
        $logs = $this->getClient()->run($this, "show {$commitHash}");
        $logs = explode("\n", $logs);
        return strpos($logs[0], 'commit') === 0;
    }