瀏覽代碼

Use dissociate git option

Added the usage of dissociate so that the repos work properly
even if the cache gets deleted after the clone
Luís Faceira 10 年之前
父節點
當前提交
7b22b7a511
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Composer/Downloader/GitDownloader.php

+ 1 - 1
src/Composer/Downloader/GitDownloader.php

@@ -43,7 +43,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
         GitUtil::cleanEnv();
         GitUtil::cleanEnv();
         $path = $this->normalizePath($path);
         $path = $this->normalizePath($path);
         $cachePath = $this->config->get('cache-vcs-dir').'/'.preg_replace('{[^a-z0-9.]}i', '-', $url).'/';
         $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();
         $ref = $package->getSourceReference();
         $flag = Platform::isWindows() ? '/D ' : '';
         $flag = Platform::isWindows() ? '/D ' : '';