public function getCommit() { $repo = $this->getRepository(); if ($repo) { try { return $this->Environment()->getCommit($this->SHA); } catch (Gitonomy\Git\Exception\ReferenceNotFoundException $ex) { return null; } } return null; }