public function getTag($tag) { $subpath = sprintf('refs/tags/%s', $tag); $path = sprintf('%s/%s', $this->dir, $subpath); if (file_exists($path)) { return Git::sha1Bin(file_get_contents($path)); } }