From e364494286f09c4f7a87f6a9a1edd9754844bafc Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 18 Apr 2012 16:05:23 +0200 Subject: [PATCH] Add BC for the composer remote --- src/Composer/Downloader/GitDownloader.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Composer/Downloader/GitDownloader.php b/src/Composer/Downloader/GitDownloader.php index 0be08598a..7f0e548c3 100644 --- a/src/Composer/Downloader/GitDownloader.php +++ b/src/Composer/Downloader/GitDownloader.php @@ -46,6 +46,9 @@ class GitDownloader extends VcsDownloader $this->io->write(" Checking out ".$target->getSourceReference()); $command = 'cd %s && git remote set-url composer %s && git fetch composer && git fetch --tags composer && git checkout %3$s && git reset --hard %3$s'; + // TODO: BC for the composer remote that didn't exist, to be remove after May 18th. + $this->process->execute(sprintf('cd %s && git remote add composer %s', escapeshellarg($path), escapeshellarg($initial->getSourceUrl())), $ignoredOutput); + $commandCallable = function($url) use ($ref, $path, $command) { return sprintf($command, escapeshellarg($path), escapeshellarg($url), escapeshellarg($ref)); };