예제 #1
0
 private function cloneGerritProjectConfig(Git_RemoteServer_GerritServer $gerrit_server, $gerrit_project_url)
 {
     $git_exec = new Git_Exec($this->dir);
     if (!is_dir($this->dir)) {
         mkdir($this->dir);
         $git_exec->init();
         $git_exec->setLocalCommiter($gerrit_server->getLogin(), 'codendiadm@' . ForgeConfig::get('sys_default_domain'));
         $git_exec->remoteAdd($gerrit_project_url);
     }
     $git_exec->pullBranch('origin', 'refs/meta/config');
     $git_exec->checkoutBranch('FETCH_HEAD');
 }