示例#1
0
 /**
  * @return Git
  */
 protected function getGit()
 {
     if (null === $this->git) {
         $this->git = new Git($this->url);
         /** @var CliAdapter $adapter */
         $adapter = $this->git->getAdapter();
         $adapter->setExecutable($this->executable);
     }
     return $this->git;
 }
示例#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;
 }