isVersioned() public method

True if the working directory is versioned
public isVersioned ( ) : boolean
return boolean
Ejemplo n.º 1
0
 private function createGitRepository()
 {
     if (!$this->repository->isVersioned()) {
         $this->reportProgressChange(InitializerStates::CREATING_GIT_REPOSITORY);
         $this->repository->init();
         $this->installGitignore();
     }
 }
Ejemplo n.º 2
0
 private function createGitRepository()
 {
     if (!$this->repository->isVersioned()) {
         $this->reportProgressChange(InitializerStates::CREATING_GIT_REPOSITORY);
         $this->repository->init();
     }
     $this->installGitignore();
     MergeDriverInstaller::installMergeDriver(VP_PROJECT_ROOT, VERSIONPRESS_PLUGIN_DIR, VP_VPDB_DIR);
 }
Ejemplo n.º 3
0
 /**
  * Create CommitAsserter to start tracking the git repo for future asserts. Should generally
  * be called after a test setup (if there is any) and before all the actual work. Asserts follow
  * after it.
  *
  * @param \VersionPress\Git\GitRepository $gitRepository
  * @param DbSchemaInfo $dbSchema
  * @param ActionsInfoProvider $actionsInfoProvider
  * @param string[] $pathPlaceholders
  */
 public function __construct($gitRepository, DbSchemaInfo $dbSchema, ActionsInfoProvider $actionsInfoProvider, $pathPlaceholders = [])
 {
     $this->gitRepository = $gitRepository;
     $this->pathPlaceholders = $pathPlaceholders;
     $this->dbSchema = $dbSchema;
     $this->actionsInfoProvider = $actionsInfoProvider;
     if ($gitRepository->isVersioned()) {
         $this->startCommit = $gitRepository->getCommit($gitRepository->getLastCommitHash());
     }
 }