composer status now includes untracked files in git repos, fixes #2664
parent
4f6693ad70
commit
b31052fcde
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue