Skip to content
Snippets Groups Projects
Commit 9fae204f authored by Roger W Feese's avatar Roger W Feese
Browse files

Don't try to load notes from a file if it doesn't exist.

parent 519ddd72
No related branches found
No related tags found
1 merge request!27Fix bulletin view missing notes error
......@@ -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);
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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment