[PATCH v2 2/4] ci(gitlab,windows): preserve exclusions during dependency setup
- From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Sep 24, 2026, 20:01 UTC
- Message-ID
- <19a4d93181c6868c71875c6dae581c3cfa6ddef2.1790280113.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.2233.v2.git.1790280113.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>
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> --- ci/install-dependencies.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ci/install-dependencies.ps1 b/ci/install-dependencies.ps1 index 8c68fb0cfc..f6868dc670 100755 --- a/ci/install-dependencies.ps1 +++ b/ci/install-dependencies.ps1 @@ -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 {
-- gitgitgadget