1
0
Fork 0

Revert "Fix push url hack"

This reverts commit 269537e466.
pull/529/head
Jordi Boggiano 2012-04-04 17:11:10 +02:00
parent 269537e466
commit 13a2bc6ff0
2 changed files with 3 additions and 3 deletions

View File

@ -119,8 +119,8 @@ class GitDownloader extends VcsDownloader
// set push url for github projects // set push url for github projects
if (preg_match('{^(?:https?|git)://github.com/([^/]+)/([^/]+?)(?:\.git)?$}', $package->getSourceUrl(), $match)) { if (preg_match('{^(?:https?|git)://github.com/([^/]+)/([^/]+?)(?:\.git)?$}', $package->getSourceUrl(), $match)) {
$pushUrl = 'git@github.com:'.$match[1].'/'.$match[2].'.git'; $pushUrl = 'git@github.com:'.$match[1].'/'.$match[2].'.git';
$cmd = sprintf('cd %s && git remote set-url --push origin %s', escapeshellarg($path), escapeshellarg($pushUrl)); $cmd = sprintf('git remote set-url --push origin %s', escapeshellarg($pushUrl));
$this->process->execute($cmd, $ignoredOutput); $this->process->execute($cmd, $ignoredOutput, $path);
} }
} }
} }

View File

@ -89,7 +89,7 @@ class GitDownloaderTest extends \PHPUnit_Framework_TestCase
->with($this->equalTo($expectedGitCommand)) ->with($this->equalTo($expectedGitCommand))
->will($this->returnValue(0)); ->will($this->returnValue(0));
$expectedGitCommand = $this->getCmd("cd 'composerPath' && git remote set-url --push origin 'git@github.com:composer/composer.git'"); $expectedGitCommand = $this->getCmd("git remote set-url --push origin 'git@github.com:composer/composer.git'");
$processExecutor->expects($this->at(3)) $processExecutor->expects($this->at(3))
->method('execute') ->method('execute')
->with($this->equalTo($expectedGitCommand)) ->with($this->equalTo($expectedGitCommand))