Browse Source

Fix commit is gone recovery, refs #1130

Jordi Boggiano 11 years ago
parent
commit
543599cdf7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Composer/Downloader/GitDownloader.php

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

@@ -260,7 +260,7 @@ class GitDownloader extends VcsDownloader
             }
             }
 
 
             // checkout the new recovered ref
             // checkout the new recovered ref
-            $command = sprintf($template, escapeshellarg($reference));
+            $command = sprintf($template, escapeshellarg($newReference));
             if (0 === $this->process->execute($command, $output, $path)) {
             if (0 === $this->process->execute($command, $output, $path)) {
                 $this->io->write('    '.$reference.' is gone (history was rewritten?), recovered by checking out '.$newReference);
                 $this->io->write('    '.$reference.' is gone (history was rewritten?), recovered by checking out '.$newReference);