/** * Removes a branch * @param Branch $branch The branch to remove */ public function removeBranch(Branch $branch) { $this->io->removeRef($branch->getHead()); }
/** * Writes the branch to IO * @param IOInterface $io An IOInterface to write to */ public function write(IOInterface $io) { if (!$this->ref) { throw new \LogicException('Branch cannot be written if no head reference exists'); } try { $io->removeRef($this->ref); } catch (\RuntimeException $e) { //Nothing to worry about, the ref just does not exist. } $this->ref->write($io); }