Пример #1
0
 protected function checkout()
 {
     if (false === is_dir($this->cwd)) {
         $this->git->checkout($this->cwd);
     } else {
         $this->git->setCwd($this->cwd);
         $this->git->pull();
     }
     $this->hasCheckout = true;
 }
Пример #2
0
 protected function getClient($url)
 {
     $client = new Git($url);
     $client->getAdapter()->setExecutable('git');
     if (null !== $this->dispatcher) {
         $client->setDispatcher($this->dispatcher);
     }
     $client->setCwd($this->cacheDir . '/git/' . md5($url));
     return $client;
 }