public function readRef($path) { $file = $this->path . '/refs/' . $path; if (!is_file($file)) { throw new \RuntimeException('Ref not found'); } $contents = file_get_contents($file); $loader = new \gihp\Object\Loader($this); return \gihp\Parser\File::importRef($loader, $contents, $path); }