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; }
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; }