public function getSHA1() { if ($this->sha1 === null) { $this->remap(); } $sha1 = parent::getSHA1(); $this->clearSHA1(); return $sha1; }
public function removeObject(\gihp\Object\Internal $object) { $hash = $object->getSHA1(); $file = $this->path . '/objects/' . substr($hash, 0, 2) . '/' . substr($hash, 2); if (!is_file($file)) { return; } return unlink($file); }