From 7b22b7a5119007454e6be379c571c2bb45d5dacc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Faceira?= Date: Thu, 10 Dec 2015 00:48:29 +0000 Subject: [PATCH] Use dissociate git option Added the usage of dissociate so that the repos work properly even if the cache gets deleted after the clone --- src/Composer/Downloader/GitDownloader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Downloader/GitDownloader.php b/src/Composer/Downloader/GitDownloader.php index 261cdf3af..37128d772 100644 --- a/src/Composer/Downloader/GitDownloader.php +++ b/src/Composer/Downloader/GitDownloader.php @@ -43,7 +43,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface GitUtil::cleanEnv(); $path = $this->normalizePath($path); $cachePath = $this->config->get('cache-vcs-dir').'/'.preg_replace('{[^a-z0-9.]}i', '-', $url).'/'; - $cacheOptions = file_exists($cachePath) ? '--reference '.ProcessExecutor::escape($cachePath).' ' : ''; + $cacheOptions = file_exists($cachePath) ? '--dissociate --reference '.ProcessExecutor::escape($cachePath).' ' : ''; $ref = $package->getSourceReference(); $flag = Platform::isWindows() ? '/D ' : '';