diff --git a/src/Composer/Command/CreateProjectCommand.php b/src/Composer/Command/CreateProjectCommand.php
index 07433dd4a..1ae6b93fb 100644
--- a/src/Composer/Command/CreateProjectCommand.php
+++ b/src/Composer/Command/CreateProjectCommand.php
@@ -24,7 +24,6 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Composer\Json\JsonFile;
-use Composer\Util\Filesystem;
use Composer\Util\RemoteFilesystem;
use Composer\Package\Version\VersionParser;
@@ -118,10 +117,7 @@ EOT
}
}
- $fs = new Filesystem();
- $prettyDirectory = rtrim($fs->isAbsolutePath($directory) ? $fs->findShortestPath(getcwd(), $directory, true) : $directory, '\\/') . '/';
-
- $io->write('Installing ' . $package->getName() . ' (' . VersionParser::formatVersion($package) . ') in '.$prettyDirectory.'', true);
+ $io->write('Installing ' . $package->getName() . ' (' . VersionParser::formatVersion($package, false) . ')', true);
$projectInstaller = new ProjectInstaller($directory, $dm);
$projectInstaller->install(new InstalledFilesystemRepository(new JsonFile('php://memory')), $package);
diff --git a/src/Composer/Package/Version/VersionParser.php b/src/Composer/Package/Version/VersionParser.php
index 4d72b4d6b..1955b6c5b 100644
--- a/src/Composer/Package/Version/VersionParser.php
+++ b/src/Composer/Package/Version/VersionParser.php
@@ -59,13 +59,13 @@ class VersionParser
return $stability === 'rc' ? 'RC' : $stability;
}
- static public function formatVersion(PackageInterface $package)
+ static public function formatVersion(PackageInterface $package, $truncate = true)
{
if (!$package->isDev() || !in_array($package->getSourceType(), array('hg', 'git'))) {
return $package->getPrettyVersion();
}
- return $package->getPrettyVersion().' '.substr($package->getSourceReference(), 0, 6);
+ return $package->getPrettyVersion() . ' ' . ($truncate ? substr($package->getSourceReference(), 0, 6) : $package->getSourceReference());
}
/**