diff --git a/src/Composer/Command/StatusCommand.php b/src/Composer/Command/StatusCommand.php index 976e9cb41..d5b483788 100644 --- a/src/Composer/Command/StatusCommand.php +++ b/src/Composer/Command/StatusCommand.php @@ -75,7 +75,7 @@ EOT $errors[$targetDir] = $targetDir . ' is a symbolic link.'; } - if ($changes = $downloader->getLocalChanges($package, $targetDir)) { + if ($changes = $downloader->getLocalChanges($package, $targetDir, true)) { $errors[$targetDir] = $changes; } diff --git a/src/Composer/Downloader/GitDownloader.php b/src/Composer/Downloader/GitDownloader.php index e1eef2a46..d38d707af 100644 --- a/src/Composer/Downloader/GitDownloader.php +++ b/src/Composer/Downloader/GitDownloader.php @@ -97,14 +97,14 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface /** * {@inheritDoc} */ - public function getLocalChanges(PackageInterface $package, $path) + public function getLocalChanges(PackageInterface $package, $path, $showUntracked = false) { GitUtil::cleanEnv(); if (!$this->hasMetadataRepository($path)) { return; } - $command = 'git status --porcelain --untracked-files=no'; + $command = 'git status --porcelain ' . ($showUntracked ? '' : ' --untracked-files=no'); if (0 !== $this->process->execute($command, $output, $path)) { throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput()); }