public function canRevert() { if (!$this->repository->isCleanWorkingDirectory()) { $this->clearOrphanedPosts(); } return $this->repository->isCleanWorkingDirectory(); }