1
0
Fork 0

Merge pull request #8980 from stucki/discard-using-git-clean

Discard changes is incomplete if Git project has additional folders
pull/8982/head
Jordi Boggiano 2020-06-16 11:08:44 +02:00 committed by GitHub
commit da6c0635d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -495,7 +495,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
protected function discardChanges($path)
{
$path = $this->normalizePath($path);
if (0 !== $this->process->execute('git reset --hard', $output, $path)) {
if (0 !== $this->process->execute('git clean -df && git reset --hard', $output, $path)) {
throw new \RuntimeException("Could not reset changes\n\n:".$this->process->getErrorOutput());
}