コード例 #1
0
ファイル: PublishRelease.php プロジェクト: silverstripe/cow
 /**
  * Change the current head to a detached state to prevent un-pushable
  * modifications affecting the development branch.
  *
  * @param OutputInterface $output
  * @param $library
  */
 protected function detachBranch(OutputInterface $output, Library $library)
 {
     $repository = $library->getRepository($output);
     $repository->run('checkout', ['HEAD~0']);
     if ($library->getBranch()) {
         throw new \LogicException("Error checking out detached HEAD~0 of " . $library->getName());
     }
 }