|
|
|
@ -261,7 +261,7 @@ class Git
|
|
|
|
|
$commandCallable = function ($url) {
|
|
|
|
|
$sanitizedUrl = preg_replace('{://([^@]+?):(.+?)@}', '://', $url);
|
|
|
|
|
|
|
|
|
|
return sprintf('git remote set-url origin %s && git remote update --prune origin && git remote set-url origin %s', ProcessExecutor::escape($url), ProcessExecutor::escape($sanitizedUrl));
|
|
|
|
|
return sprintf('git remote set-url origin %s && git remote update --prune origin && git remote set-url origin %s && git gc --auto', ProcessExecutor::escape($url), ProcessExecutor::escape($sanitizedUrl));
|
|
|
|
|
};
|
|
|
|
|
$this->runCommand($commandCallable, $url, $dir);
|
|
|
|
|
} catch (\Exception $e) {
|
|
|
|
|