ci(gitlab,windows): preserve exclusions during dependency setup

Creating .git/info/exclude as a file with `New-Item` and `-Force`
truncates existing contents.

When install-dependencies.ps1 follows install-sdk.ps1, this discards
the latter's /git-sdk exclusion and causes ci/lib.sh to reject SDK
files as unignored build artifacts.

Assisted-by: GPT-6
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
main
Johannes Schindelin 2026-09-24 20:01:51 +00:00 committed by Junio C Hamano
parent 661f415b9d
commit 0af2d7af63
1 changed files with 3 additions and 1 deletions

View File

@ -12,7 +12,9 @@ $RustVersion = '1.96.0'

New-Item -Path $DownloadDirectory -ItemType Directory -Force | Out-Null
New-Item -Path .git/info -ItemType Directory -Force | Out-Null
New-Item -Path .git/info/exclude -ItemType File -Force | Out-Null
if (-not (Test-Path .git/info/exclude)) {
New-Item -Path .git/info/exclude -ItemType File | Out-Null
}
Add-Content -Path .git/info/exclude -Value "/$DownloadDirectory"

function Get-Installer {