From 2431408493f9f299bd3b3aa99b87e29dcba053e5 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 17 Jun 2026 17:37:09 +0200 Subject: [PATCH 1/4] git-extra.install.in: do not fail when builtins do not exist yet When git-extra is installed into a fresh prefix (as happens during the MinGit build), the builtins listed in `builtins.txt` do not exist yet under `libexec/git-core/` because Git has not been installed at that prefix before. The unconditional `rm` fails for every single builtin, producing a wall of "No such file or directory" errors. Guard the `rm` with `test ! -f ... ||` so the loop only removes files that actually exist, and the `ln` always runs to create the hardlink regardless. Assisted-by: Opus 4.6 Signed-off-by: Johannes Schindelin --- git-extra/git-extra.install.in | 1 + 1 file changed, 1 insertion(+) diff --git a/git-extra/git-extra.install.in b/git-extra/git-extra.install.in index 4fc992f3aa..b684291667 100644 --- a/git-extra/git-extra.install.in +++ b/git-extra/git-extra.install.in @@ -25,6 +25,7 @@ GITATTRIBUTES then for b in $(cat @@MINGW_PREFIX@@/share/git/builtins.txt) do + test ! -f @@MINGW_PREFIX@@/libexec/git-core/$b || rm @@MINGW_PREFIX@@/libexec/git-core/$b && ln $git_wrapper @@MINGW_PREFIX@@/libexec/git-core/$b From 2bfdfef45fa9db3ea0a043ffadc78a79ac32da31 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 17 Jun 2026 17:42:58 +0200 Subject: [PATCH 2/4] git-extra.install.in: replace remaining $arch with @@MSYSTEM_CARCH@@ Commit 50464f3a ("git-extra: hard-code which Pacman repositories to add at build-time") converted most runtime `$arch` references to the build-time template variable `@@MSYSTEM_CARCH@@`, but three were missed: the bintray-to-wingit URL migration (line 88), the pacman sync database rename loop (lines 99/101), and the i686 libunistring workaround (line 270). The `$arch` variable is not set when `please.sh` sources the install script and calls `post_install` directly (as it does during MinGit/installer builds), which makes the unquoted `test i686 = $arch` on line 270 expand to `test i686 = -a -e ...` and causes a syntax error. The other two references silently produced wrong paths. Replace all three with the `@@MSYSTEM_CARCH@@` template variable, which is expanded at package build time to the correct value. Assisted-by: Opus 4.6 Signed-off-by: Johannes Schindelin --- git-extra/git-extra.install.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/git-extra/git-extra.install.in b/git-extra/git-extra.install.in index b684291667..b2524bc7a3 100644 --- a/git-extra/git-extra.install.in +++ b/git-extra/git-extra.install.in @@ -85,7 +85,7 @@ GITATTRIBUTES @@ENDIF_CLANGARM64@@ ! grep -q 'https://dl.bintray.com/\$repo/pacman/\$arch' etc/pacman.conf || - sed -i -e 's/https:\/\/dl\.bintray\.com\/\$repo\/pacman\/\$arch/https:\/\/wingit.blob.core.windows.net\/'$arch'/g' etc/pacman.conf + sed -i -e 's/https:\/\/dl\.bintray\.com\/\$repo\/pacman\/\$arch/https:\/\/wingit.blob.core.windows.net\/@@MSYSTEM_CARCH@@/g' etc/pacman.conf ! grep -q 'https://dl.bintray.com/git-for-windows/pacman/i686' etc/pacman.conf || sed -i -e 's/https:\/\/dl\.bintray\.com\/git-for-windows\/pacman\/i686/https:\/\/wingit.blob.core.windows.net\/i686/g' etc/pacman.conf @@ -96,9 +96,9 @@ GITATTRIBUTES # The main pacman database was renamed from `git-for-windows` to `git-for-windows-` for ext in db db.sig files files.sig do - if ! test -f var/lib/pacman/sync/git-for-windows-$arch.$ext + if ! test -f var/lib/pacman/sync/git-for-windows-@@MSYSTEM_CARCH@@.$ext then - mv var/lib/pacman/sync/git-for-windows.$ext var/lib/pacman/sync/git-for-windows-$arch.$ext + mv var/lib/pacman/sync/git-for-windows.$ext var/lib/pacman/sync/git-for-windows-@@MSYSTEM_CARCH@@.$ext elif test -f var/lib/pacman/sync/git-for-windows.$ext then rm var/lib/pacman/sync/git-for-windows.$ext @@ -267,7 +267,7 @@ test -d "$TMPDIR" || test ! -d "$TMP" || {\ sed -i -e 's|"[CD]:/[^"]*/usr/|"/usr/|g' /etc/xml/catalog # Remove work around for an outdated i686 gnupg/gnutls build that depended on a hence-updated libunistring - if test i686 = $arch -a -e /usr/bin/msys-unistring-2.dll && + if test i686 = "@@MSYSTEM_CARCH@@" -a -e /usr/bin/msys-unistring-2.dll && ! pacman -Qoq /usr/bin/msys-unistring-2.dll >/dev/null 2>&1 && ! grep -q msys-unistring-2 /usr/bin/msys-gnutls-30.dll 2>&1 >/dev/null then From cd940aab6443b0361cf113a06dbf2c0d9bf4cce4 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 17 Jun 2026 15:56:01 +0000 Subject: [PATCH 3/4] git-extra: update checksums Signed-off-by: Johannes Schindelin --- git-extra/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-extra/PKGBUILD b/git-extra/PKGBUILD index 24c5c034ae..d3d0a4563f 100644 --- a/git-extra/PKGBUILD +++ b/git-extra/PKGBUILD @@ -4,7 +4,7 @@ _realname="git-extra" pkgbase="mingw-w64-${_realname}" pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") _ver_base=1.1 -pkgver=1.1.709.fa78d67ca +pkgver=1.1.712.2bfdfef45 pkgrel=1 pkgdesc="Git for Windows extra files" arch=('any') @@ -62,7 +62,7 @@ source=('git-extra.install.in' 'git-askpass.c' 'git-askpass.h' 'git-askpass.rc') -sha256sums=('463c956c0b38db5f1fa7d343af1059b4381f6ac5d05b39a2227cb029d442318d' +sha256sums=('b6448dac5fe317ada8a0b8e73c86b907467bf339f0449fb0a2595debe59eedfe' '8ed76d1cb069ac8568f21c431f5e23caebea502d932ab4cdff71396f4f0d5b72' 'e36a3b93b8a33b0a74619f2449ed6d56ed54e4e2938b97070bce4926f1f44054' '640d04d2a2da709419188a986d5e5550ad30df23c7ea9be1a389c37a6b917994' From 61fa55c20def2c541bdc9bb3152c46e66ef4f47b Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 17 Jun 2026 18:37:34 +0200 Subject: [PATCH 4/4] git-extra: bump version Assisted-by: Opus 4.6 Signed-off-by: Johannes Schindelin --- git-extra/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-extra/PKGBUILD b/git-extra/PKGBUILD index d3d0a4563f..4cbceaffa1 100644 --- a/git-extra/PKGBUILD +++ b/git-extra/PKGBUILD @@ -4,7 +4,7 @@ _realname="git-extra" pkgbase="mingw-w64-${_realname}" pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") _ver_base=1.1 -pkgver=1.1.712.2bfdfef45 +pkgver=1.1.713.cd940aab6 pkgrel=1 pkgdesc="Git for Windows extra files" arch=('any')