{"thread":{"id":"66348","subject":"[PATCH 0/4] gitlab-ci: fix the cargo invocation in the Windows job","startedAt":"2026-09-19T12:12:16Z","lastAt":"2026-09-28T14:33:36Z","messageCount":27,"participants":["Johannes Schindelin via GitGitGadget","Karthik Nayak","Johannes Schindelin","Patrick Steinhardt","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"552870","messageId":"pull.2233.git.1789819933.gitgitgadget@gmail.com","threadId":"66348","inReplyTo":null,"subject":"[PATCH 0/4] gitlab-ci: fix the cargo invocation in the Windows job","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-09-19T12:12:09Z","receivedAt":"2026-09-19T12:12:16Z","isPatch":true,"body":"In https://lore.kernel.org/git/xmqq8q4zosri.fsf@gitster.g/, Junio mentioned\nthat the GitLab CI seems broken since I enabled Rust in the Windows-based CI\njobs. This patch series should fix it (lightly tested, but I don't have a\nwhole lot of build minutes on GitLab).\n\nJohannes Schindelin (4):\n  ci(gitlab,windows): provision GNU Rust for SDK-based MinGW builds\n  ci(gitlab,windows): preserve exclusions during dependency setup\n  ci(gitlab,windows): fix Rust setup for GitLab's MinGW build\n  ci(gitlab,windows): provide GNU Rust's host-linker support\n\n .gitlab-ci.yml              |  5 ++++-\n ci/install-dependencies.ps1 | 22 ++++++++++++++++------\n 2 files changed, 20 insertions(+), 7 deletions(-)\n\n\nbase-commit: d38352cd43ab9745686d697872408bc3249a153f\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2233%2Fdscho%2Ffix-cargo-in-windows-gitlab-ci-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2233/dscho/fix-cargo-in-windows-gitlab-ci-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/2233\n-- \ngitgitgadget\n"},{"id":"552871","messageId":"6a389b2bad1653175bde2a767ffbb5b672e324e2.1789819933.git.gitgitgadget@gmail.com","threadId":"66348","inReplyTo":"pull.2233.git.1789819933.gitgitgadget@gmail.com","subject":"[PATCH 1/4] ci(gitlab,windows): provision GNU Rust for SDK-based MinGW builds","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-09-19T12:12:10Z","receivedAt":"2026-09-19T12:12:19Z","isPatch":true,"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe minimal Git for Windows SDK already supplies Git and GCC. The\nMinGW Makefile build needs the GNU Rust toolchain, not another Git\ninstallation or Meson.\n\nLet the dependency installer serve this configuration while keeping\nthe existing package set for MSVC builds.\n\nAssisted-by: GPT-6\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n ci/install-dependencies.ps1 | 18 +++++++++++++-----\n 1 file changed, 13 insertions(+), 5 deletions(-)\n\ndiff --git a/ci/install-dependencies.ps1 b/ci/install-dependencies.ps1\nindex e3b367fa54..8c68fb0cfc 100755\n--- a/ci/install-dependencies.ps1\n+++ b/ci/install-dependencies.ps1\n@@ -1,5 +1,6 @@\n param(\n-    [string]$DownloadDirectory = '.dependencies'\n+    [string]$DownloadDirectory = '.dependencies',\n+    [switch]$Mingw\n )\n \n $ErrorActionPreference = 'Stop'\n@@ -41,6 +42,17 @@ function Invoke-Installer {\n     }\n }\n \n+$rustTarget = if ($Mingw) { 'gnu' } else { 'msvc' }\n+$rustMsi = Get-Installer \"rust-$rustTarget.msi\" (\n+    \"https://static.rust-lang.org/dist/\" +\n+    \"rust-$RustVersion-x86_64-pc-windows-$rustTarget.msi\")\n+Invoke-Installer msiexec.exe @('/i', $rustMsi, 'INSTALLDIR=C:\\Rust',\n+    'ADDLOCAL=Rustc,Cargo,Std', '/quiet', '/norestart')\n+\n+if ($Mingw) {\n+    return\n+}\n+\n $gitAssetVersion = $GitVersion -replace '\\.windows\\.\\d+$', ''\n $gitInstaller = Get-Installer \"Git-Installer.exe\" `\n     \"https://github.com/git-for-windows/git/releases/download/v$GitVersion/PortableGit-$gitAssetVersion-64-bit.7z.exe\"\n@@ -49,7 +61,3 @@ Invoke-Installer $gitInstaller @('-y', '-o\"C:\\Program Files\\Git\"')\n $mesonMsi = Get-Installer \"meson.msi\" `\n     \"https://github.com/mesonbuild/meson/releases/download/$MesonVersion/meson-$MesonVersion-64.msi\"\n Invoke-Installer msiexec.exe @('/i', $mesonMsi, 'INSTALLDIR=C:\\Meson', '/quiet', '/norestart')\n-\n-$rustMsi = Get-Installer \"rust.msi\" `\n-    \"https://static.rust-lang.org/dist/rust-$RustVersion-x86_64-pc-windows-msvc.msi\"\n-Invoke-Installer msiexec.exe @('/i', $rustMsi, 'INSTALLDIR=C:\\Rust', 'ADDLOCAL=Rustc,Cargo,Std', '/quiet', '/norestart')\n-- \ngitgitgadget\n\n"},{"id":"552872","messageId":"8855c25128d7bd91bd6514a259ef8165f2fd81ac.1789819933.git.gitgitgadget@gmail.com","threadId":"66348","inReplyTo":"pull.2233.git.1789819933.gitgitgadget@gmail.com","subject":"[PATCH 2/4] ci(gitlab,windows): preserve exclusions during dependency setup","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-09-19T12:12:11Z","receivedAt":"2026-09-19T12:12:23Z","isPatch":true,"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCreating .git/info/exclude as a file with `New-Item` and `-Force`\ntruncates existing contents.\n\nWhen install-dependencies.ps1 follows install-sdk.ps1, this discards\nthe latter's /git-sdk exclusion and causes ci/lib.sh to reject SDK\nfiles as unignored build artifacts.\n\nAssisted-by: GPT-6\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n ci/install-dependencies.ps1 | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/ci/install-dependencies.ps1 b/ci/install-dependencies.ps1\nindex 8c68fb0cfc..f6868dc670 100755\n--- a/ci/install-dependencies.ps1\n+++ b/ci/install-dependencies.ps1\n@@ -12,7 +12,9 @@ $RustVersion = '1.96.0'\n \n New-Item -Path $DownloadDirectory -ItemType Directory -Force | Out-Null\n New-Item -Path .git/info -ItemType Directory -Force | Out-Null\n-New-Item -Path .git/info/exclude -ItemType File -Force | Out-Null\n+if (-not (Test-Path .git/info/exclude)) {\n+    New-Item -Path .git/info/exclude -ItemType File | Out-Null\n+}\n Add-Content -Path .git/info/exclude -Value \"/$DownloadDirectory\"\n \n function Get-Installer {\n-- \ngitgitgadget\n\n"},{"id":"552873","messageId":"57a83d15fda4ad3d4297f665d6c35e205e916e7a.1789819933.git.gitgitgadget@gmail.com","threadId":"66348","inReplyTo":"pull.2233.git.1789819933.gitgitgadget@gmail.com","subject":"[PATCH 3/4] ci(gitlab,windows): fix Rust setup for GitLab's MinGW build","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-09-19T12:12:12Z","receivedAt":"2026-09-19T12:12:26Z","isPatch":true,"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nGitLab's MinGW job fails with \"cargo: command not found\":\nhttps://gitlab.com/git-scm/git/-/jobs/16576450182\n\n86909a94db5d (ci(windows): build with Rust, 2026-09-13) enabled Rust\nin the shared CI configuration, but added the necessary setup only\nfor GitHub Actions.\n\nThe build needs Cargo to be reachable after the minimal SDK's login\nprofile replaces PATH. Installing the toolchain alone is not enough.\n\nAssisted-by: GPT-6\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .gitlab-ci.yml | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/.gitlab-ci.yml b/.gitlab-ci.yml\nindex cd6fd4a504..3f24835500 100644\n--- a/.gitlab-ci.yml\n+++ b/.gitlab-ci.yml\n@@ -133,8 +133,11 @@ build:mingw64:\n   before_script:\n     - *windows_before_script\n     - ./ci/install-sdk.ps1 -directory \"git-sdk\"\n+    - ./ci/install-dependencies.ps1 -Mingw\n   script:\n-    - git-sdk/usr/bin/bash.exe -l -c 'ci/make-test-artifacts.sh artifacts'\n+    # The minimal SDK's profile resets PATH.\n+    - git-sdk/usr/bin/bash.exe -l -c\n+        'PATH=$PATH:/c/Rust/bin ci/make-test-artifacts.sh artifacts'\n   artifacts:\n     paths:\n       - artifacts\n-- \ngitgitgadget\n\n"},{"id":"552874","messageId":"1ed79f00cf72b2d5f2e5f55bb11de51dceeeb2bb.1789819933.git.gitgitgadget@gmail.com","threadId":"66348","inReplyTo":"pull.2233.git.1789819933.gitgitgadget@gmail.com","subject":"[PATCH 4/4] ci(gitlab,windows): provide GNU Rust's host-linker support","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-09-19T12:12:13Z","receivedAt":"2026-09-19T12:12:29Z","isPatch":true,"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nGitLab's MinGW job cannot find `x86_64-w64-mingw32-gcc` when linking\ngitcore's build script:\nhttps://gitlab.com/dscho/git1/-/jobs/16593470275\n\nAlthough gitcore is a static library, Cargo first links `build.rs`\nas a host executable. We omitted the GNU MSI's `Gcc` feature, which\nsupplies the required linker and platform libraries:\nhttps://github.com/rust-lang/rust/blob/1.96.0/src/etc/installer/msi/rust.wxs\n\nAssisted-by: GPT-6\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n ci/install-dependencies.ps1 | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/ci/install-dependencies.ps1 b/ci/install-dependencies.ps1\nindex f6868dc670..9b833b9370 100755\n--- a/ci/install-dependencies.ps1\n+++ b/ci/install-dependencies.ps1\n@@ -49,7 +49,7 @@ $rustMsi = Get-Installer \"rust-$rustTarget.msi\" (\n     \"https://static.rust-lang.org/dist/\" +\n     \"rust-$RustVersion-x86_64-pc-windows-$rustTarget.msi\")\n Invoke-Installer msiexec.exe @('/i', $rustMsi, 'INSTALLDIR=C:\\Rust',\n-    'ADDLOCAL=Rustc,Cargo,Std', '/quiet', '/norestart')\n+    \"ADDLOCAL=Rustc,Cargo,Std$(if ($Mingw) { ',Gcc' })\", '/quiet', '/norestart')\n \n if ($Mingw) {\n     return\n-- \ngitgitgadget\n"},{"id":"552878","messageId":"CAOLa=ZTgF+Qw_1FMUEF-YyBYo-gKnhPVk+qxd+gt1PMrt9GYqQ@mail.gmail.com","threadId":"66348","inReplyTo":"pull.2233.git.1789819933.gitgitgadget@gmail.com","subject":"Re: [PATCH 0/4] gitlab-ci: fix the cargo invocation in the Windows job","fromName":"Karthik Nayak","fromEmail":"karthik.188@gmail.com","sentAt":"2026-09-19T13:37:43Z","receivedAt":"2026-09-19T13:37:46Z","isPatch":true,"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> In https://lore.kernel.org/git/xmqq8q4zosri.fsf@gitster.g/, Junio mentioned\n> that the GitLab CI seems broken since I enabled Rust in the Windows-based CI\n> jobs. This patch series should fix it (lightly tested, but I don't have a\n> whole lot of build minutes on GitLab).\n>\n\nI've created an MR [1] on our team repo for testing, I'll try to update\nwith newer versions (if any). The pipeline for this version is here [2].\n\n[1]: https://gitlab.com/gitlab-org/git/-/merge_requests/671\n[2]: https://gitlab.com/gitlab-org/git/-/pipelines/2863888081\n\n> Johannes Schindelin (4):\n>   ci(gitlab,windows): provision GNU Rust for SDK-based MinGW builds\n>   ci(gitlab,windows): preserve exclusions during dependency setup\n>   ci(gitlab,windows): fix Rust setup for GitLab's MinGW build\n>   ci(gitlab,windows): provide GNU Rust's host-linker support\n>\n>  .gitlab-ci.yml              |  5 ++++-\n>  ci/install-dependencies.ps1 | 22 ++++++++++++++++------\n>  2 files changed, 20 insertions(+), 7 deletions(-)\n>\n>\n> base-commit: d38352cd43ab9745686d697872408bc3249a153f\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2233%2Fdscho%2Ffix-cargo-in-windows-gitlab-ci-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2233/dscho/fix-cargo-in-windows-gitlab-ci-v1\n> Pull-Request: https://github.com/gitgitgadget/git/pull/2233\n> --\n> gitgitgadget\n"},{"id":"552912","messageId":"6c2bba91-a1a9-3547-4be3-f4f9ce03e696@gmx.de","threadId":"66348","inReplyTo":"CAOLa=ZTgF+Qw_1FMUEF-YyBYo-gKnhPVk+qxd+gt1PMrt9GYqQ@mail.gmail.com","subject":"Re: [PATCH 0/4] gitlab-ci: fix the cargo invocation in the Windows job","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2026-09-20T15:27:06Z","receivedAt":"2026-09-20T15:27:09Z","isPatch":true,"body":"Hi Karthik,\n\nOn Sun, 20 Sep 2026, Karthik Nayak wrote:\n\n> \"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n> \n> > In https://lore.kernel.org/git/xmqq8q4zosri.fsf@gitster.g/, Junio mentioned\n> > that the GitLab CI seems broken since I enabled Rust in the Windows-based CI\n> > jobs. This patch series should fix it (lightly tested, but I don't have a\n> > whole lot of build minutes on GitLab).\n> >\n> \n> I've created an MR [1] on our team repo for testing, I'll try to update\n> with newer versions (if any). The pipeline for this version is here [2].\n> \n> [1]: https://gitlab.com/gitlab-org/git/-/merge_requests/671\n> [2]: https://gitlab.com/gitlab-org/git/-/pipelines/2863888081\n\nThank you!\n\nIt looks as if the `build:mingw64` job succeeded, as planned (although it\nshould now probably say `build:ucrt64`?).\n\nThe `build:msvc-meson` job seems to have timed out trying to do something\nwith credentials, though...\n\nCiao,\nJohannes\n"},{"id":"552933","messageId":"CAOLa=ZQkJui77Xz2HL4sAWsaYLAzU6EPvBk+RzKkKxoiY_8aKw@mail.gmail.com","threadId":"66348","inReplyTo":"6c2bba91-a1a9-3547-4be3-f4f9ce03e696@gmx.de","subject":"Re: [PATCH 0/4] gitlab-ci: fix the cargo invocation in the Windows job","fromName":"Karthik Nayak","fromEmail":"karthik.188@gmail.com","sentAt":"2026-09-21T14:03:44Z","receivedAt":"2026-09-21T14:03:46Z","isPatch":true,"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi Karthik,\n>\n> On Sun, 20 Sep 2026, Karthik Nayak wrote:\n>\n>> \"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>>\n>> > In https://lore.kernel.org/git/xmqq8q4zosri.fsf@gitster.g/, Junio mentioned\n>> > that the GitLab CI seems broken since I enabled Rust in the Windows-based CI\n>> > jobs. This patch series should fix it (lightly tested, but I don't have a\n>> > whole lot of build minutes on GitLab).\n>> >\n>>\n>> I've created an MR [1] on our team repo for testing, I'll try to update\n>> with newer versions (if any). The pipeline for this version is here [2].\n>>\n>> [1]: https://gitlab.com/gitlab-org/git/-/merge_requests/671\n>> [2]: https://gitlab.com/gitlab-org/git/-/pipelines/2863888081\n>\n> Thank you!\n>\n> It looks as if the `build:mingw64` job succeeded, as planned (although it\n> should now probably say `build:ucrt64`?).\n>\n> The `build:msvc-meson` job seems to have timed out trying to do something\n> with credentials, though...\n\nRe-ran the job and it seems to now run as expected.\n\n>\n> Ciao,\n> Johannes\n"},{"id":"552975","messageId":"cd4dc991-0791-c4b7-19d1-c45018ccc119@gmx.de","threadId":"66348","inReplyTo":"CAOLa=ZQkJui77Xz2HL4sAWsaYLAzU6EPvBk+RzKkKxoiY_8aKw@mail.gmail.com","subject":"Re: [PATCH 0/4] gitlab-ci: fix the cargo invocation in the Windows job","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2026-09-22T11:50:33Z","receivedAt":"2026-09-22T11:50:36Z","isPatch":true,"body":"Hi Karthik,\n\nOn Mon, 21 Sep 2026, Karthik Nayak wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > On Sun, 20 Sep 2026, Karthik Nayak wrote:\n> >\n> >> \"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n> >>\n> >> > In https://lore.kernel.org/git/xmqq8q4zosri.fsf@gitster.g/, Junio mentioned\n> >> > that the GitLab CI seems broken since I enabled Rust in the Windows-based CI\n> >> > jobs. This patch series should fix it (lightly tested, but I don't have a\n> >> > whole lot of build minutes on GitLab).\n> >> >\n> >>\n> >> I've created an MR [1] on our team repo for testing, I'll try to update\n> >> with newer versions (if any). The pipeline for this version is here [2].\n> >>\n> >> [1]: https://gitlab.com/gitlab-org/git/-/merge_requests/671\n> >> [2]: https://gitlab.com/gitlab-org/git/-/pipelines/2863888081\n> >\n> > Thank you!\n> >\n> > It looks as if the `build:mingw64` job succeeded, as planned (although it\n> > should now probably say `build:ucrt64`?).\n> >\n> > The `build:msvc-meson` job seems to have timed out trying to do something\n> > with credentials, though...\n> \n> Re-ran the job and it seems to now run as expected.\n\nSeems that now some `test:msvc-meson` jobs failed. I had a closer look:\nthe failures happened during the cleanup phase. Apparently there is a\nproblematic change in the Runner image:\n\nAll failing jobs used Runner 19.4.0~pre.2085.g4d3dddee. Its cleanup code\n(https://gitlab.com/gitlab-org/gitlab-runner/-/blob/4d3dddee/shells/abstract.go#L2081)\ncalls `writeClearGitCredentials()`, which runs `git credential reject`:\nhttps://gitlab.com/gitlab-org/gitlab-runner/-/blob/4d3dddee/shells/abstract.go#L758\n\nHowever, this `git credential reject` then calls _Git Credential Manager_,\nwhich assumes that it is running interactively. And that there is anything\nto reject. And therefore it waits for the user to react to the open\ndialog, but there is no user, so it times out after two hours.\n\nThe successfully-retried build\n(https://gitlab.com/gitlab-org/git/-/jobs/16625727899) and the passing\ntest slice 3 (https://gitlab.com/gitlab-org/git/-/jobs/16604448474) used\nRunner **18.8.0**, whose cleanup code\n(https://gitlab.com/gitlab-org/gitlab-runner/-/blob/v18.8.0/shells/abstract.go#L1699)\nlacks that credential-clearing call.\n\nMight be worth pointing that out to your colleagues who are in charge of\nthat Runner image?\n\nCiao,\nJohannes\n"},{"id":"553045","messageId":"CAOLa=ZSnKsqm1Mt6t1nYO8-yWpwB6OZiQBK3Outr=EPaxBep-Q@mail.gmail.com","threadId":"66348","inReplyTo":"cd4dc991-0791-c4b7-19d1-c45018ccc119@gmx.de","subject":"Re: [PATCH 0/4] gitlab-ci: fix the cargo invocation in the Windows job","fromName":"Karthik Nayak","fromEmail":"karthik.188@gmail.com","sentAt":"2026-09-23T12:43:42Z","receivedAt":"2026-09-23T12:43:44Z","isPatch":true,"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi Karthik,\n>\n> On Mon, 21 Sep 2026, Karthik Nayak wrote:\n>\n>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>>\n>> > On Sun, 20 Sep 2026, Karthik Nayak wrote:\n>> >\n>> >> \"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>> >>\n>> >> > In https://lore.kernel.org/git/xmqq8q4zosri.fsf@gitster.g/, Junio mentioned\n>> >> > that the GitLab CI seems broken since I enabled Rust in the Windows-based CI\n>> >> > jobs. This patch series should fix it (lightly tested, but I don't have a\n>> >> > whole lot of build minutes on GitLab).\n>> >> >\n>> >>\n>> >> I've created an MR [1] on our team repo for testing, I'll try to update\n>> >> with newer versions (if any). The pipeline for this version is here [2].\n>> >>\n>> >> [1]: https://gitlab.com/gitlab-org/git/-/merge_requests/671\n>> >> [2]: https://gitlab.com/gitlab-org/git/-/pipelines/2863888081\n>> >\n>> > Thank you!\n>> >\n>> > It looks as if the `build:mingw64` job succeeded, as planned (although it\n>> > should now probably say `build:ucrt64`?).\n>> >\n>> > The `build:msvc-meson` job seems to have timed out trying to do something\n>> > with credentials, though...\n>>\n>> Re-ran the job and it seems to now run as expected.\n>\n> Seems that now some `test:msvc-meson` jobs failed. I had a closer look:\n> the failures happened during the cleanup phase. Apparently there is a\n> problematic change in the Runner image:\n>\n> All failing jobs used Runner 19.4.0~pre.2085.g4d3dddee. Its cleanup code\n> (https://gitlab.com/gitlab-org/gitlab-runner/-/blob/4d3dddee/shells/abstract.go#L2081)\n> calls `writeClearGitCredentials()`, which runs `git credential reject`:\n> https://gitlab.com/gitlab-org/gitlab-runner/-/blob/4d3dddee/shells/abstract.go#L758\n>\n> However, this `git credential reject` then calls _Git Credential Manager_,\n> which assumes that it is running interactively. And that there is anything\n> to reject. And therefore it waits for the user to react to the open\n> dialog, but there is no user, so it times out after two hours.\n>\n> The successfully-retried build\n> (https://gitlab.com/gitlab-org/git/-/jobs/16625727899) and the passing\n> test slice 3 (https://gitlab.com/gitlab-org/git/-/jobs/16604448474) used\n> Runner **18.8.0**, whose cleanup code\n> (https://gitlab.com/gitlab-org/gitlab-runner/-/blob/v18.8.0/shells/abstract.go#L1699)\n> lacks that credential-clearing call.\n>\n> Might be worth pointing that out to your colleagues who are in charge of\n> that Runner image?\n>\n\nI have no idea about this, but have forwarded the message to the\nappropriate team. Hopefully we see some resolution. Thanks for the\ndebugging!\n\nKarthik\n> Ciao,\n> Johannes\n"},{"id":"553166","messageId":"arUHyjHAX20ovmr8@pks.im","threadId":"66348","inReplyTo":"6a389b2bad1653175bde2a767ffbb5b672e324e2.1789819933.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 1/4] ci(gitlab,windows): provision GNU Rust for SDK-based MinGW builds","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-09-24T11:21:46Z","receivedAt":"2026-09-24T11:21:53Z","isPatch":true,"body":"On Sat, Sep 19, 2026 at 12:12:10PM +0000, Johannes Schindelin via GitGitGadget wrote:\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> \n> The minimal Git for Windows SDK already supplies Git and GCC. The\n> MinGW Makefile build needs the GNU Rust toolchain, not another Git\n> installation or Meson.\n\nHuh, what's GNU Rust?\n\n> Let the dependency installer serve this configuration while keeping\n> the existing package set for MSVC builds.\n\nOkay. What's implicit here is that we in fact don't use this script at\nall at the current point in time for our MinGW build, we rather use the\n\"install-sdk.ps1\" script. I assume it will be wired up in the next step,\nso let's read on.\n\n> diff --git a/ci/install-dependencies.ps1 b/ci/install-dependencies.ps1\n> index e3b367fa54..8c68fb0cfc 100755\n> --- a/ci/install-dependencies.ps1\n> +++ b/ci/install-dependencies.ps1\n> @@ -41,6 +42,17 @@ function Invoke-Installer {\n>      }\n>  }\n>  \n> +$rustTarget = if ($Mingw) { 'gnu' } else { 'msvc' }\n> +$rustMsi = Get-Installer \"rust-$rustTarget.msi\" (\n> +    \"https://static.rust-lang.org/dist/\" +\n> +    \"rust-$RustVersion-x86_64-pc-windows-$rustTarget.msi\")\n> +Invoke-Installer msiexec.exe @('/i', $rustMsi, 'INSTALLDIR=C:\\Rust',\n> +    'ADDLOCAL=Rustc,Cargo,Std', '/quiet', '/norestart')\n> +\n> +if ($Mingw) {\n> +    return\n> +}\n> +\n>  $gitAssetVersion = $GitVersion -replace '\\.windows\\.\\d+$', ''\n>  $gitInstaller = Get-Installer \"Git-Installer.exe\" `\n>      \"https://github.com/git-for-windows/git/releases/download/v$GitVersion/PortableGit-$gitAssetVersion-64-bit.7z.exe\"\n\nOkay, so installing Rust is the only thing we will want to do on both\nMSVC and MinGW builds.\n\nPatrick\n"},{"id":"553167","messageId":"arUH0v3rdq6lzriE@pks.im","threadId":"66348","inReplyTo":"8855c25128d7bd91bd6514a259ef8165f2fd81ac.1789819933.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 2/4] ci(gitlab,windows): preserve exclusions during dependency setup","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-09-24T11:21:54Z","receivedAt":"2026-09-24T11:21:58Z","isPatch":true,"body":"On Sat, Sep 19, 2026 at 12:12:11PM +0000, Johannes Schindelin via GitGitGadget wrote:\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> \n> Creating .git/info/exclude as a file with `New-Item` and `-Force`\n> truncates existing contents.\n> \n> When install-dependencies.ps1 follows install-sdk.ps1, this discards\n> the latter's /git-sdk exclusion and causes ci/lib.sh to reject SDK\n> files as unignored build artifacts.\n\nOkay, this confirms that it's indeed the plan to start calling this\nscript for MinGW builds, too.\n\n> diff --git a/ci/install-dependencies.ps1 b/ci/install-dependencies.ps1\n> index 8c68fb0cfc..f6868dc670 100755\n> --- a/ci/install-dependencies.ps1\n> +++ b/ci/install-dependencies.ps1\n> @@ -12,7 +12,9 @@ $RustVersion = '1.96.0'\n>  \n>  New-Item -Path $DownloadDirectory -ItemType Directory -Force | Out-Null\n>  New-Item -Path .git/info -ItemType Directory -Force | Out-Null\n> -New-Item -Path .git/info/exclude -ItemType File -Force | Out-Null\n> +if (-not (Test-Path .git/info/exclude)) {\n> +    New-Item -Path .git/info/exclude -ItemType File | Out-Null\n> +}\n>  Add-Content -Path .git/info/exclude -Value \"/$DownloadDirectory\"\n\nMakes sense.\n\nPatrick\n"},{"id":"553168","messageId":"arUH2KM2rHQwhmpf@pks.im","threadId":"66348","inReplyTo":"57a83d15fda4ad3d4297f665d6c35e205e916e7a.1789819933.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 3/4] ci(gitlab,windows): fix Rust setup for GitLab's MinGW build","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-09-24T11:22:00Z","receivedAt":"2026-09-24T11:22:05Z","isPatch":true,"body":"On Sat, Sep 19, 2026 at 12:12:12PM +0000, Johannes Schindelin via GitGitGadget wrote:\n> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml\n> index cd6fd4a504..3f24835500 100644\n> --- a/.gitlab-ci.yml\n> +++ b/.gitlab-ci.yml\n> @@ -133,8 +133,11 @@ build:mingw64:\n>    before_script:\n>      - *windows_before_script\n>      - ./ci/install-sdk.ps1 -directory \"git-sdk\"\n> +    - ./ci/install-dependencies.ps1 -Mingw\n\nI wonder whether it would now make sense to also hoist \"install-sdk.ps1\"\ninto \"install-dependencies.ps1\" now.\n\n>    script:\n> -    - git-sdk/usr/bin/bash.exe -l -c 'ci/make-test-artifacts.sh artifacts'\n> +    # The minimal SDK's profile resets PATH.\n> +    - git-sdk/usr/bin/bash.exe -l -c\n> +        'PATH=$PATH:/c/Rust/bin ci/make-test-artifacts.sh artifacts'\n\nAre we sure that PATH cannot ever contain spaces or should we rather\nquote here?\n\nPatrick\n"},{"id":"553169","messageId":"arUH3Bi26yyVcrOb@pks.im","threadId":"66348","inReplyTo":"1ed79f00cf72b2d5f2e5f55bb11de51dceeeb2bb.1789819933.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 4/4] ci(gitlab,windows): provide GNU Rust's host-linker support","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-09-24T11:22:04Z","receivedAt":"2026-09-24T11:22:09Z","isPatch":true,"body":"On Sat, Sep 19, 2026 at 12:12:13PM +0000, Johannes Schindelin via GitGitGadget wrote:\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> \n> GitLab's MinGW job cannot find `x86_64-w64-mingw32-gcc` when linking\n> gitcore's build script:\n> https://gitlab.com/dscho/git1/-/jobs/16593470275\n> \n> Although gitcore is a static library, Cargo first links `build.rs`\n> as a host executable. We omitted the GNU MSI's `Gcc` feature, which\n> supplies the required linker and platform libraries:\n> https://github.com/rust-lang/rust/blob/1.96.0/src/etc/installer/msi/rust.wxs\n\nHm. Does that mean that we now have two versions of GCC available, once\nvia the MinGW environment and once via Rust?\n\nThanks!\n\nPatrick\n"},{"id":"553227","messageId":"e58bdd38-59df-5fd0-8c80-e9ab9714dd97@gmx.de","threadId":"66348","inReplyTo":"arUHyjHAX20ovmr8@pks.im","subject":"Re: [PATCH 1/4] ci(gitlab,windows): provision GNU Rust for SDK-based MinGW builds","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2026-09-24T19:26:08Z","receivedAt":"2026-09-24T19:26:14Z","isPatch":true,"body":"Hi Patrick,\n\nOn Thu, 24 Sep 2026, Patrick Steinhardt wrote:\n\n> On Sat, Sep 19, 2026 at 12:12:10PM +0000, Johannes Schindelin via GitGitGadget wrote:\n> > From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > \n> > The minimal Git for Windows SDK already supplies Git and GCC. The\n> > MinGW Makefile build needs the GNU Rust toolchain, not another Git\n> > installation or Meson.\n> \n> Huh, what's GNU Rust?\n\nSorry, poor wording. I meant the Rust toolchain compatible with GCC (as\nopposed to the Rust toolchain producing Visual C-compatible libraries).\n\nWill reword. Using `git history reword`, thank you so much for that!\n\n> > Let the dependency installer serve this configuration while keeping\n> > the existing package set for MSVC builds.\n> \n> Okay. What's implicit here is that we in fact don't use this script at\n> all at the current point in time for our MinGW build, we rather use the\n> \"install-sdk.ps1\" script. I assume it will be wired up in the next step,\n> so let's read on.\n\nCorrect. Will clarify the commit message.\n\n> > diff --git a/ci/install-dependencies.ps1 b/ci/install-dependencies.ps1\n> > index e3b367fa54..8c68fb0cfc 100755\n> > --- a/ci/install-dependencies.ps1\n> > +++ b/ci/install-dependencies.ps1\n> > @@ -41,6 +42,17 @@ function Invoke-Installer {\n> >      }\n> >  }\n> >  \n> > +$rustTarget = if ($Mingw) { 'gnu' } else { 'msvc' }\n> > +$rustMsi = Get-Installer \"rust-$rustTarget.msi\" (\n> > +    \"https://static.rust-lang.org/dist/\" +\n> > +    \"rust-$RustVersion-x86_64-pc-windows-$rustTarget.msi\")\n> > +Invoke-Installer msiexec.exe @('/i', $rustMsi, 'INSTALLDIR=C:\\Rust',\n> > +    'ADDLOCAL=Rustc,Cargo,Std', '/quiet', '/norestart')\n> > +\n> > +if ($Mingw) {\n> > +    return\n> > +}\n> > +\n> >  $gitAssetVersion = $GitVersion -replace '\\.windows\\.\\d+$', ''\n> >  $gitInstaller = Get-Installer \"Git-Installer.exe\" `\n> >      \"https://github.com/git-for-windows/git/releases/download/v$GitVersion/PortableGit-$gitAssetVersion-64-bit.7z.exe\"\n> \n> Okay, so installing Rust is the only thing we will want to do on both\n> MSVC and MinGW builds.\n\nPrecisely (or as Claude would say: You're absolutely right!),\nJohannes\n"},{"id":"553230","messageId":"1c829af9-1923-a6ff-78a1-b738cc6bf5a6@gmx.de","threadId":"66348","inReplyTo":"arUH2KM2rHQwhmpf@pks.im","subject":"Re: [PATCH 3/4] ci(gitlab,windows): fix Rust setup for GitLab's MinGW build","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2026-09-24T19:55:53Z","receivedAt":"2026-09-24T19:55:55Z","isPatch":true,"body":"Hi Patrick,\n\nOn Thu, 24 Sep 2026, Patrick Steinhardt wrote:\n\n> On Sat, Sep 19, 2026 at 12:12:12PM +0000, Johannes Schindelin via GitGitGadget wrote:\n> > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml\n> > index cd6fd4a504..3f24835500 100644\n> > --- a/.gitlab-ci.yml\n> > +++ b/.gitlab-ci.yml\n> > @@ -133,8 +133,11 @@ build:mingw64:\n> >    before_script:\n> >      - *windows_before_script\n> >      - ./ci/install-sdk.ps1 -directory \"git-sdk\"\n> > +    - ./ci/install-dependencies.ps1 -Mingw\n> \n> I wonder whether it would now make sense to also hoist \"install-sdk.ps1\"\n> into \"install-dependencies.ps1\" now.\n\nHonestly, I wouldn't. It is conceptually a different thing, the SDK brings\na ready-configured environment (which _partially_ ships dependencies,\nthat's right, but it's a Venn diagram, not a strict super set\nrelationship).\n\n> >    script:\n> > -    - git-sdk/usr/bin/bash.exe -l -c 'ci/make-test-artifacts.sh artifacts'\n> > +    # The minimal SDK's profile resets PATH.\n> > +    - git-sdk/usr/bin/bash.exe -l -c\n> > +        'PATH=$PATH:/c/Rust/bin ci/make-test-artifacts.sh artifacts'\n> \n> Are we sure that PATH cannot ever contain spaces or should we rather\n> quote here?\n\nAh, quoting in shell, what a wonderfully magical world. While you would be\ncorrect that passing an unquoted `$PATH` as an _argument_ would cause\nunwanted misinterpretation as multiple arguments instead of a single one,\n_assigning variables_ is a completely different issue. Observe:\n\n  $ x=\"Patrick Steinhardt\"; x=$x=hello env | grep ^x=\n  x=Patrick Steinhardt=hello\n\nWha...? It did _not_ split the $x at whitespace? No. In what must have\noccurred as quite logical to the inventors of the Unix shell syntax,\ninterpolating unquoted variables in assignments does *not* split at\nwhitespace, unlike in other instances where unquoted variables are very\nmuch split at whitespace.\n\nCiao,\nJohannes\n"},{"id":"553232","messageId":"b62a7c6d-6248-d957-ef76-3b7e3bf28105@gmx.de","threadId":"66348","inReplyTo":"arUH3Bi26yyVcrOb@pks.im","subject":"Re: [PATCH 4/4] ci(gitlab,windows): provide GNU Rust's host-linker support","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2026-09-24T19:57:43Z","receivedAt":"2026-09-24T19:57:46Z","isPatch":true,"body":"Hi Patrick,\n\nOn Thu, 24 Sep 2026, Patrick Steinhardt wrote:\n\n> On Sat, Sep 19, 2026 at 12:12:13PM +0000, Johannes Schindelin via GitGitGadget wrote:\n> > From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > \n> > GitLab's MinGW job cannot find `x86_64-w64-mingw32-gcc` when linking\n> > gitcore's build script:\n> > https://gitlab.com/dscho/git1/-/jobs/16593470275\n> > \n> > Although gitcore is a static library, Cargo first links `build.rs`\n> > as a host executable. We omitted the GNU MSI's `Gcc` feature, which\n> > supplies the required linker and platform libraries:\n> > https://github.com/rust-lang/rust/blob/1.96.0/src/etc/installer/msi/rust.wxs\n> \n> Hm. Does that mean that we now have two versions of GCC available, once\n> via the MinGW environment and once via Rust?\n\nI don't think that Rust produces intermediate C by default, so no, this\nwould include a second version of GCC. It will just make sure that the\ninstalled Rust version can produce libraries that GCC can link to.\n\nCiao,\nJohannes\n"},{"id":"553234","messageId":"pull.2233.v2.git.1790280113.gitgitgadget@gmail.com","threadId":"66348","inReplyTo":"pull.2233.git.1789819933.gitgitgadget@gmail.com","subject":"[PATCH v2 0/4] gitlab-ci: fix the cargo invocation in the Windows job","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-09-24T20:01:49Z","receivedAt":"2026-09-24T20:01:56Z","isPatch":true,"body":"In https://lore.kernel.org/git/xmqq8q4zosri.fsf@gitster.g/, Junio mentioned\nthat the GitLab CI seems broken since I enabled Rust in the Windows-based CI\njobs. This patch series should fix it (lightly tested, but I don't have a\nwhole lot of build minutes on GitLab).\n\nChanges since v1:\n\n * Reworded the commit messages to clarify previously confusing statements.\n\nJohannes Schindelin (4):\n  ci(gitlab,windows): provision GNU Rust for SDK-based MinGW builds\n  ci(gitlab,windows): preserve exclusions during dependency setup\n  ci(gitlab,windows): fix Rust setup for GitLab's MinGW build\n  ci(gitlab,windows): provide GNU Rust's host-linker support\n\n .gitlab-ci.yml              |  5 ++++-\n ci/install-dependencies.ps1 | 22 ++++++++++++++++------\n 2 files changed, 20 insertions(+), 7 deletions(-)\n\n\nbase-commit: d38352cd43ab9745686d697872408bc3249a153f\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2233%2Fdscho%2Ffix-cargo-in-windows-gitlab-ci-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2233/dscho/fix-cargo-in-windows-gitlab-ci-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/2233\n\nRange-diff vs v1:\n\n 1:  6a389b2bad ! 1:  cdf2eff480 ci(gitlab,windows): provision GNU Rust for SDK-based MinGW builds\n     @@ Metadata\n       ## Commit message ##\n          ci(gitlab,windows): provision GNU Rust for SDK-based MinGW builds\n      \n     -    The minimal Git for Windows SDK already supplies Git and GCC. The\n     -    MinGW Makefile build needs the GNU Rust toolchain, not another Git\n     -    installation or Meson.\n     +    The minimal Git for Windows SDK already supplies Git and GCC. The MinGW\n     +    Makefile build needs the Rust toolchain that targets GCC (as opposed to\n     +    the more common MSVC one), not another Git installation or Meson.\n      \n     -    Let the dependency installer serve this configuration while keeping\n     -    the existing package set for MSVC builds.\n     +    Prepare the `install-dependencies.ps1` script to be able to install the\n     +    GCC-targeting Rust toolchain.\n      \n          Assisted-by: GPT-6\n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n 2:  8855c25128 = 2:  19a4d93181 ci(gitlab,windows): preserve exclusions during dependency setup\n 3:  57a83d15fd = 3:  6703fa0349 ci(gitlab,windows): fix Rust setup for GitLab's MinGW build\n 4:  1ed79f00cf ! 4:  5310afcdf9 ci(gitlab,windows): provide GNU Rust's host-linker support\n     @@ Commit message\n          https://gitlab.com/dscho/git1/-/jobs/16593470275\n      \n          Although gitcore is a static library, Cargo first links `build.rs`\n     -    as a host executable. We omitted the GNU MSI's `Gcc` feature, which\n     +    as a host executable. We omitted the Rust MSI's `Gcc` feature, which\n          supplies the required linker and platform libraries:\n          https://github.com/rust-lang/rust/blob/1.96.0/src/etc/installer/msi/rust.wxs\n      \n\n-- \ngitgitgadget\n"},{"id":"553233","messageId":"cdf2eff48020ef72bcfe36aa55467c9cc8ece9ac.1790280113.git.gitgitgadget@gmail.com","threadId":"66348","inReplyTo":"pull.2233.v2.git.1790280113.gitgitgadget@gmail.com","subject":"[PATCH v2 1/4] ci(gitlab,windows): provision GNU Rust for SDK-based MinGW builds","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-09-24T20:01:50Z","receivedAt":"2026-09-24T20:01:58Z","isPatch":true,"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe minimal Git for Windows SDK already supplies Git and GCC. The MinGW\nMakefile build needs the Rust toolchain that targets GCC (as opposed to\nthe more common MSVC one), not another Git installation or Meson.\n\nPrepare the `install-dependencies.ps1` script to be able to install the\nGCC-targeting Rust toolchain.\n\nAssisted-by: GPT-6\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n ci/install-dependencies.ps1 | 18 +++++++++++++-----\n 1 file changed, 13 insertions(+), 5 deletions(-)\n\ndiff --git a/ci/install-dependencies.ps1 b/ci/install-dependencies.ps1\nindex e3b367fa54..8c68fb0cfc 100755\n--- a/ci/install-dependencies.ps1\n+++ b/ci/install-dependencies.ps1\n@@ -1,5 +1,6 @@\n param(\n-    [string]$DownloadDirectory = '.dependencies'\n+    [string]$DownloadDirectory = '.dependencies',\n+    [switch]$Mingw\n )\n \n $ErrorActionPreference = 'Stop'\n@@ -41,6 +42,17 @@ function Invoke-Installer {\n     }\n }\n \n+$rustTarget = if ($Mingw) { 'gnu' } else { 'msvc' }\n+$rustMsi = Get-Installer \"rust-$rustTarget.msi\" (\n+    \"https://static.rust-lang.org/dist/\" +\n+    \"rust-$RustVersion-x86_64-pc-windows-$rustTarget.msi\")\n+Invoke-Installer msiexec.exe @('/i', $rustMsi, 'INSTALLDIR=C:\\Rust',\n+    'ADDLOCAL=Rustc,Cargo,Std', '/quiet', '/norestart')\n+\n+if ($Mingw) {\n+    return\n+}\n+\n $gitAssetVersion = $GitVersion -replace '\\.windows\\.\\d+$', ''\n $gitInstaller = Get-Installer \"Git-Installer.exe\" `\n     \"https://github.com/git-for-windows/git/releases/download/v$GitVersion/PortableGit-$gitAssetVersion-64-bit.7z.exe\"\n@@ -49,7 +61,3 @@ Invoke-Installer $gitInstaller @('-y', '-o\"C:\\Program Files\\Git\"')\n $mesonMsi = Get-Installer \"meson.msi\" `\n     \"https://github.com/mesonbuild/meson/releases/download/$MesonVersion/meson-$MesonVersion-64.msi\"\n Invoke-Installer msiexec.exe @('/i', $mesonMsi, 'INSTALLDIR=C:\\Meson', '/quiet', '/norestart')\n-\n-$rustMsi = Get-Installer \"rust.msi\" `\n-    \"https://static.rust-lang.org/dist/rust-$RustVersion-x86_64-pc-windows-msvc.msi\"\n-Invoke-Installer msiexec.exe @('/i', $rustMsi, 'INSTALLDIR=C:\\Rust', 'ADDLOCAL=Rustc,Cargo,Std', '/quiet', '/norestart')\n-- \ngitgitgadget\n\n"},{"id":"553236","messageId":"19a4d93181c6868c71875c6dae581c3cfa6ddef2.1790280113.git.gitgitgadget@gmail.com","threadId":"66348","inReplyTo":"pull.2233.v2.git.1790280113.gitgitgadget@gmail.com","subject":"[PATCH v2 2/4] ci(gitlab,windows): preserve exclusions during dependency setup","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-09-24T20:01:51Z","receivedAt":"2026-09-24T20:02:02Z","isPatch":true,"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCreating .git/info/exclude as a file with `New-Item` and `-Force`\ntruncates existing contents.\n\nWhen install-dependencies.ps1 follows install-sdk.ps1, this discards\nthe latter's /git-sdk exclusion and causes ci/lib.sh to reject SDK\nfiles as unignored build artifacts.\n\nAssisted-by: GPT-6\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n ci/install-dependencies.ps1 | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/ci/install-dependencies.ps1 b/ci/install-dependencies.ps1\nindex 8c68fb0cfc..f6868dc670 100755\n--- a/ci/install-dependencies.ps1\n+++ b/ci/install-dependencies.ps1\n@@ -12,7 +12,9 @@ $RustVersion = '1.96.0'\n \n New-Item -Path $DownloadDirectory -ItemType Directory -Force | Out-Null\n New-Item -Path .git/info -ItemType Directory -Force | Out-Null\n-New-Item -Path .git/info/exclude -ItemType File -Force | Out-Null\n+if (-not (Test-Path .git/info/exclude)) {\n+    New-Item -Path .git/info/exclude -ItemType File | Out-Null\n+}\n Add-Content -Path .git/info/exclude -Value \"/$DownloadDirectory\"\n \n function Get-Installer {\n-- \ngitgitgadget\n\n"},{"id":"553235","messageId":"6703fa0349785a38547ebeab55cd1c5d5b742618.1790280113.git.gitgitgadget@gmail.com","threadId":"66348","inReplyTo":"pull.2233.v2.git.1790280113.gitgitgadget@gmail.com","subject":"[PATCH v2 3/4] ci(gitlab,windows): fix Rust setup for GitLab's MinGW build","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-09-24T20:01:52Z","receivedAt":"2026-09-24T20:02:03Z","isPatch":true,"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nGitLab's MinGW job fails with \"cargo: command not found\":\nhttps://gitlab.com/git-scm/git/-/jobs/16576450182\n\n86909a94db5d (ci(windows): build with Rust, 2026-09-13) enabled Rust\nin the shared CI configuration, but added the necessary setup only\nfor GitHub Actions.\n\nThe build needs Cargo to be reachable after the minimal SDK's login\nprofile replaces PATH. Installing the toolchain alone is not enough.\n\nAssisted-by: GPT-6\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .gitlab-ci.yml | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/.gitlab-ci.yml b/.gitlab-ci.yml\nindex cd6fd4a504..3f24835500 100644\n--- a/.gitlab-ci.yml\n+++ b/.gitlab-ci.yml\n@@ -133,8 +133,11 @@ build:mingw64:\n   before_script:\n     - *windows_before_script\n     - ./ci/install-sdk.ps1 -directory \"git-sdk\"\n+    - ./ci/install-dependencies.ps1 -Mingw\n   script:\n-    - git-sdk/usr/bin/bash.exe -l -c 'ci/make-test-artifacts.sh artifacts'\n+    # The minimal SDK's profile resets PATH.\n+    - git-sdk/usr/bin/bash.exe -l -c\n+        'PATH=$PATH:/c/Rust/bin ci/make-test-artifacts.sh artifacts'\n   artifacts:\n     paths:\n       - artifacts\n-- \ngitgitgadget\n\n"},{"id":"553237","messageId":"5310afcdf9d8ae461532cff439ec056f91053ef0.1790280113.git.gitgitgadget@gmail.com","threadId":"66348","inReplyTo":"pull.2233.v2.git.1790280113.gitgitgadget@gmail.com","subject":"[PATCH v2 4/4] ci(gitlab,windows): provide GNU Rust's host-linker support","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-09-24T20:01:53Z","receivedAt":"2026-09-24T20:02:06Z","isPatch":true,"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nGitLab's MinGW job cannot find `x86_64-w64-mingw32-gcc` when linking\ngitcore's build script:\nhttps://gitlab.com/dscho/git1/-/jobs/16593470275\n\nAlthough gitcore is a static library, Cargo first links `build.rs`\nas a host executable. We omitted the Rust MSI's `Gcc` feature, which\nsupplies the required linker and platform libraries:\nhttps://github.com/rust-lang/rust/blob/1.96.0/src/etc/installer/msi/rust.wxs\n\nAssisted-by: GPT-6\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n ci/install-dependencies.ps1 | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/ci/install-dependencies.ps1 b/ci/install-dependencies.ps1\nindex f6868dc670..9b833b9370 100755\n--- a/ci/install-dependencies.ps1\n+++ b/ci/install-dependencies.ps1\n@@ -49,7 +49,7 @@ $rustMsi = Get-Installer \"rust-$rustTarget.msi\" (\n     \"https://static.rust-lang.org/dist/\" +\n     \"rust-$RustVersion-x86_64-pc-windows-$rustTarget.msi\")\n Invoke-Installer msiexec.exe @('/i', $rustMsi, 'INSTALLDIR=C:\\Rust',\n-    'ADDLOCAL=Rustc,Cargo,Std', '/quiet', '/norestart')\n+    \"ADDLOCAL=Rustc,Cargo,Std$(if ($Mingw) { ',Gcc' })\", '/quiet', '/norestart')\n \n if ($Mingw) {\n     return\n-- \ngitgitgadget\n"},{"id":"553406","messageId":"aroOHoSXsemSlP-7@pks.im","threadId":"66348","inReplyTo":"pull.2233.v2.git.1790280113.gitgitgadget@gmail.com","subject":"Re: [PATCH v2 0/4] gitlab-ci: fix the cargo invocation in the Windows job","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-09-28T06:50:06Z","receivedAt":"2026-09-28T06:50:12Z","isPatch":true,"body":"On Thu, Sep 24, 2026 at 08:01:49PM +0000, Johannes Schindelin via GitGitGadget wrote:\n> Range-diff vs v1:\n> \n>  1:  6a389b2bad ! 1:  cdf2eff480 ci(gitlab,windows): provision GNU Rust for SDK-based MinGW builds\n>      @@ Metadata\n>        ## Commit message ##\n>           ci(gitlab,windows): provision GNU Rust for SDK-based MinGW builds\n>       \n>      -    The minimal Git for Windows SDK already supplies Git and GCC. The\n>      -    MinGW Makefile build needs the GNU Rust toolchain, not another Git\n>      -    installation or Meson.\n>      +    The minimal Git for Windows SDK already supplies Git and GCC. The MinGW\n>      +    Makefile build needs the Rust toolchain that targets GCC (as opposed to\n>      +    the more common MSVC one), not another Git installation or Meson.\n\nBy the way, are there plans to eventually include Rust as part of the\nGfW SDK? Just asking out of curiosity.\n\nOverall I'm happy with this version, thanks!\n\nPatrick\n"},{"id":"553407","messageId":"aroOJHlxCs9Rnwv-@pks.im","threadId":"66348","inReplyTo":"1c829af9-1923-a6ff-78a1-b738cc6bf5a6@gmx.de","subject":"Re: [PATCH 3/4] ci(gitlab,windows): fix Rust setup for GitLab's MinGW build","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-09-28T06:50:12Z","receivedAt":"2026-09-28T06:50:16Z","isPatch":true,"body":"On Thu, Sep 24, 2026 at 09:55:53PM +0200, Johannes Schindelin wrote:\n> Hi Patrick,\n> \n> On Thu, 24 Sep 2026, Patrick Steinhardt wrote:\n> \n> > On Sat, Sep 19, 2026 at 12:12:12PM +0000, Johannes Schindelin via GitGitGadget wrote:\n> > > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml\n> > > index cd6fd4a504..3f24835500 100644\n> > > --- a/.gitlab-ci.yml\n> > > +++ b/.gitlab-ci.yml\n> > > @@ -133,8 +133,11 @@ build:mingw64:\n> > >    before_script:\n> > >      - *windows_before_script\n> > >      - ./ci/install-sdk.ps1 -directory \"git-sdk\"\n> > > +    - ./ci/install-dependencies.ps1 -Mingw\n> > \n> > I wonder whether it would now make sense to also hoist \"install-sdk.ps1\"\n> > into \"install-dependencies.ps1\" now.\n> \n> Honestly, I wouldn't. It is conceptually a different thing, the SDK brings\n> a ready-configured environment (which _partially_ ships dependencies,\n> that's right, but it's a Venn diagram, not a strict super set\n> relationship).\n\nFair enough.\n\n> > >    script:\n> > > -    - git-sdk/usr/bin/bash.exe -l -c 'ci/make-test-artifacts.sh artifacts'\n> > > +    # The minimal SDK's profile resets PATH.\n> > > +    - git-sdk/usr/bin/bash.exe -l -c\n> > > +        'PATH=$PATH:/c/Rust/bin ci/make-test-artifacts.sh artifacts'\n> > \n> > Are we sure that PATH cannot ever contain spaces or should we rather\n> > quote here?\n> \n> Ah, quoting in shell, what a wonderfully magical world. While you would be\n> correct that passing an unquoted `$PATH` as an _argument_ would cause\n> unwanted misinterpretation as multiple arguments instead of a single one,\n> _assigning variables_ is a completely different issue. Observe:\n> \n>   $ x=\"Patrick Steinhardt\"; x=$x=hello env | grep ^x=\n>   x=Patrick Steinhardt=hello\n> \n> Wha...? It did _not_ split the $x at whitespace? No. In what must have\n> occurred as quite logical to the inventors of the Unix shell syntax,\n> interpolating unquoted variables in assignments does *not* split at\n> whitespace, unlike in other instances where unquoted variables are very\n> much split at whitespace.\n\nWell, TIL :)\n\nPatrick\n"},{"id":"553475","messageId":"139c09f8-a126-c24f-9264-154f9b2e38bd@gmx.de","threadId":"66348","inReplyTo":"aroOHoSXsemSlP-7@pks.im","subject":"Re: [PATCH v2 0/4] gitlab-ci: fix the cargo invocation in the Windows job","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2026-09-28T13:41:39Z","receivedAt":"2026-09-28T13:41:45Z","isPatch":true,"body":"Hi Patrick,\n\nOn Mon, 28 Sep 2026, Patrick Steinhardt wrote:\n\n> On Thu, Sep 24, 2026 at 08:01:49PM +0000, Johannes Schindelin via GitGitGadget wrote:\n> > Range-diff vs v1:\n> > \n> >  1:  6a389b2bad ! 1:  cdf2eff480 ci(gitlab,windows): provision GNU Rust for SDK-based MinGW builds\n> >      @@ Metadata\n> >        ## Commit message ##\n> >           ci(gitlab,windows): provision GNU Rust for SDK-based MinGW builds\n> >       \n> >      -    The minimal Git for Windows SDK already supplies Git and GCC. The\n> >      -    MinGW Makefile build needs the GNU Rust toolchain, not another Git\n> >      -    installation or Meson.\n> >      +    The minimal Git for Windows SDK already supplies Git and GCC. The MinGW\n> >      +    Makefile build needs the Rust toolchain that targets GCC (as opposed to\n> >      +    the more common MSVC one), not another Git installation or Meson.\n> \n> By the way, are there plans to eventually include Rust as part of the\n> GfW SDK? Just asking out of curiosity.\n\nI'm still agonizing over that. There is now this new `sha1dc` Rust crate I\nwant to integrate (patch series about to land), therefore I need to get\ngoing with including Rust in Git for Windows' SDK. But it's not looking so\nrosy! As described in the PR to include Rust in Git for Windows at\nhttps://github.com/git-for-windows/git-sdk-64/pull/132, the addition comes\nat the price of roughly 110MB.\n\nGiven that `git-sdk-x86_75-minimal.tar.zst` weighs just under 70MB (see\nhttps://github.com/git-for-windows/git-sdk-64/releases/ci-artifacts), that\nwould more than _double_ its size!\n\nSo I'm really torn between including Rust (and having a strict subset of\nthe same setup in CI as is used to build Git for Windows releases) or\nalternatively stick with the current strategy: Expect the correct Rust\ntoolchain to be installed separately in CI.\n\nOn GitHub Actions, Rust is basically already there, and we'd save a 110MB\nextra download for _ever_ `win-*` job (of which there are _a lot_ on any\ngiven day).\n\nBut GitLab runners do not (yet?) come with Rust preinstalled, so... 🤷\n\n> Overall I'm happy with this version, thanks!\n\nThanks!\nJohannes\n"},{"id":"553478","messageId":"xmqqcxtxpi3p.fsf@gitster.g","threadId":"66348","inReplyTo":"aroOHoSXsemSlP-7@pks.im","subject":"Re: [PATCH v2 0/4] gitlab-ci: fix the cargo invocation in the Windows job","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-09-28T14:26:34Z","receivedAt":"2026-09-28T14:26:37Z","isPatch":true,"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> On Thu, Sep 24, 2026 at 08:01:49PM +0000, Johannes Schindelin via GitGitGadget wrote:\n>> Range-diff vs v1:\n>> \n>>  1:  6a389b2bad ! 1:  cdf2eff480 ci(gitlab,windows): provision GNU Rust for SDK-based MinGW builds\n>>      @@ Metadata\n>>        ## Commit message ##\n>>           ci(gitlab,windows): provision GNU Rust for SDK-based MinGW builds\n>>       \n>>      -    The minimal Git for Windows SDK already supplies Git and GCC. The\n>>      -    MinGW Makefile build needs the GNU Rust toolchain, not another Git\n>>      -    installation or Meson.\n>>      +    The minimal Git for Windows SDK already supplies Git and GCC. The MinGW\n>>      +    Makefile build needs the Rust toolchain that targets GCC (as opposed to\n>>      +    the more common MSVC one), not another Git installation or Meson.\n>\n> By the way, are there plans to eventually include Rust as part of the\n> GfW SDK? Just asking out of curiosity.\n>\n> Overall I'm happy with this version, thanks!\n>\n> Patrick\n\nThanks for writing and reviewing, both of you.  Let me mark the\ntopic for 'next'.\n"},{"id":"553480","messageId":"xmqq8q4lphs5.fsf@gitster.g","threadId":"66348","inReplyTo":"aroOJHlxCs9Rnwv-@pks.im","subject":"Re: [PATCH 3/4] ci(gitlab,windows): fix Rust setup for GitLab's MinGW build","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-09-28T14:33:30Z","receivedAt":"2026-09-28T14:33:36Z","isPatch":true,"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n>> > Are we sure that PATH cannot ever contain spaces or should we rather\n>> > quote here?\n>> ...\n> Well, TIL :)\n\nOur coding guidelines share some blame.  As some implementations of\nshells historically were buggy when assignment is combined with\nmodifers (e.g., \"export var=val\") and split the right hand side at\n$IFS, we strongly encourage assignment to be written with right hand\nside quoted even when you shouldn't have to.  Uniformly applying the\nsafer rule is easier on mere mortals than knowing and remembering\nexactly when we do not have to quote and omitting the quote ;-).\n\n\n"}]}