feat(installer): do shallow clones
no need to get the whole repo history :)
This commit is contained in:
+2
-2
@@ -1138,7 +1138,7 @@ function Install-Repository {
|
||||
Write-Info "Trying SSH clone..."
|
||||
$env:GIT_SSH_COMMAND = "ssh -o BatchMode=yes -o ConnectTimeout=5"
|
||||
try {
|
||||
git -c windows.appendAtomically=false clone --branch $Branch $RepoUrlSsh $InstallDir
|
||||
git -c windows.appendAtomically=false clone --depth 1 --branch $Branch $RepoUrlSsh $InstallDir
|
||||
if ($LASTEXITCODE -eq 0) { $cloneSuccess = $true }
|
||||
} catch { }
|
||||
$env:GIT_SSH_COMMAND = $null
|
||||
@@ -1147,7 +1147,7 @@ function Install-Repository {
|
||||
if (Test-Path $InstallDir) { Remove-Item -Recurse -Force $InstallDir -ErrorAction SilentlyContinue }
|
||||
Write-Info "SSH failed, trying HTTPS..."
|
||||
try {
|
||||
git -c windows.appendAtomically=false clone --branch $Branch $RepoUrlHttps $InstallDir
|
||||
git -c windows.appendAtomically=false clone --depth 1 --branch $Branch $RepoUrlHttps $InstallDir
|
||||
if ($LASTEXITCODE -eq 0) { $cloneSuccess = $true }
|
||||
} catch { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user