diff --git a/application/modules/bulletin/models/RepositoryModel.php b/application/modules/bulletin/models/RepositoryModel.php index 2cad2ec60275c3322cbb92675c64b5f2cf7b135f..f0d79cee6677f370723811b7e55dcc5b74110a7c 100644 --- a/application/modules/bulletin/models/RepositoryModel.php +++ b/application/modules/bulletin/models/RepositoryModel.php @@ -64,10 +64,13 @@ class Bulletin_RepositoryModel public function getFileNotes($path, $branch = 'master') { $object = $note = ''; + $filepath = $this->_repoPath . '/' . $path; $this->_checkout($branch); - $this->_git_exec('hash-object ' . escapeshellarg($this->_repoPath . '/' . $path), $object); - $this->_git_exec('notes --ref=creq show ' . escapeshellarg($object), $note); + if(file_exists($filepath)){ + $this->_git_exec('hash-object ' . escapeshellarg($filepath), $object); + $this->_git_exec('notes --ref=creq show ' . escapeshellarg($object), $note); + } $this->_checkout('master'); return $note;