From 769f31bb9b5587eb5ae0ac1d7832ea378229d30b Mon Sep 17 00:00:00 2001 From: Claudio Hoffmann Date: Sat, 21 Jun 2025 21:35:25 +0200 Subject: [PATCH 1/4] astextplain: restore passthrough for plaintext DOC/DOT files The fix for https://github.com/git-for-windows/git/issues/5641 broke diffs for plaintext DOC and DOT files: $ echo Test > test.doc $ git add test.doc $ git diff --cached E: unsupported filetype test.doc Since `file` correctly identifies the mimetype of such files as `text/plain`, this can be fixed by simply covering this case and printing the file content as it was done previously. Signed-off-by: Claudio Hoffmann --- git-extra/astextplain | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-extra/astextplain b/git-extra/astextplain index ac5ab42390..ca1eb88a28 100755 --- a/git-extra/astextplain +++ b/git-extra/astextplain @@ -21,7 +21,7 @@ case "$(file --brief --mime-type "$1")" in out=$(pdftotext -q -layout -enc UTF-8 "$1" -) && sed "s/(\^M$)|(^\^L)//" <<<$out || cat "$1" ;; # TODO add rtf support - application/rtf | text/rtf) + application/rtf | text/rtf | text/plain) cat "$1" ;; *) From 036188a82c72fbe404fc120525a18bd29da0673d Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 23 Jun 2025 08:45:27 +0200 Subject: [PATCH 2/4] git-extra: fix the `pkgver` logic again In 48e2403b3 (git-extra: ignore generated changes for the sake of `pkgver`, 2025-03-05) I tried to address the fact that the commit that updates `pkgver` in `PKGBUILD` necessarily touches the `git-extra/` subdirectory, yet should not be considered for the package version. What I failed to address is the rare case when `HEAD` is not the same as `$rev`, i.e. when the last commit that touched the `git-extra/` directory` is not at the tip of the branch. Let's accommodate for that, too. Signed-off-by: Johannes Schindelin --- git-extra/PKGBUILD | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/git-extra/PKGBUILD b/git-extra/PKGBUILD index 9678e5e3bb..5d902bfa92 100644 --- a/git-extra/PKGBUILD +++ b/git-extra/PKGBUILD @@ -20,9 +20,11 @@ pkgver() { cd "$startdir" test ! -f "$(git rev-parse --git-path shallow)" || git -c http.sslbackend fetch --unshallow rev="$(git rev-list -1 HEAD -- . ':(exclude)./git-extra.install')" - test -n "$(git show . ':(exclude)./git-extra.install' | - sed -n -e '1,/^@@/d' -e '/^[-+]pkgver=/d' -e '/^[-+]pkgver=/d' -e "/^[-+] *'[0-9a-f]\{64\}'$/d" -e '/^[-+]/p')" || - rev="$(git rev-list -1 $rev^ -- .)" + while test -z "$(git show $rev . ':(exclude)./git-extra.install' | + sed -n -e '1,/^@@/d' -e '/^[-+]pkgver=/d' -e '/^[-+]pkgver=/d' -e "/^[-+] *'[0-9a-f]\{64\}'$/d" -e '/^[-+]/p')" + do + rev="$(git rev-list -1 $rev^ -- .)" + done printf "%s.%s.%s" "${_ver_base}" "$(git rev-list --count $rev -- .)" \ "$(git rev-parse --short=9 $rev)" } From 0b5e63e2a8bfb44f85a0dcfb90dfa1463dc9f763 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 23 Jun 2025 08:53:44 +0200 Subject: [PATCH 3/4] git-extra: update checksums 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 5d902bfa92..dc4982f04c 100644 --- a/git-extra/PKGBUILD +++ b/git-extra/PKGBUILD @@ -81,7 +81,7 @@ sha256sums=('8ed76d1cb069ac8568f21c431f5e23caebea502d932ab4cdff71396f4f0d5b72' 'dcbd1b981d5b899afe30151a5f5a27ea52025ff1335f131af1b5891f62ddd55b' '683ab066be19cb4defec470ebd53f165ca5dbf761fd40c13aee8abe31ba42803' '1cf2c13fb97c51375a76ed479362c3cbcdb51ab4d3a745e8d2c3a780badd8d46' - '2ad7292f8ea4aa7d027221bff2a987ad8e7c72a6866a5f14ea67f6187e850244' + '32223da4e1264d0c9663dd3d4b347131a634e96c2676d673ca58b2a6c58d2aea' '1f83355ec7be0f11239b68d3b9d4d04534b347212a9eac4335397875a13514ef' '22f41610dea842890955032af30efdb60e80f310e95a04e57ab36b10e0376923' '38c0cf57e03d275cdd42984f102bee8352fac672f875ab23c46b9625eefc49f3' From ea851d9fad388adbe9ddb1a1260ccf7505e5fd2c Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 23 Jun 2025 08:55:06 +0200 Subject: [PATCH 4/4] git-extra: update pkgver 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 dc4982f04c..99a512ee08 100644 --- a/git-extra/PKGBUILD +++ b/git-extra/PKGBUILD @@ -5,7 +5,7 @@ pkgbase="mingw-w64-${_realname}" pkgname=($_realname "${MINGW_PACKAGE_PREFIX}-${_realname}") _ver_base=1.1 -pkgver=1.1.663.1dcfb5e44 +pkgver=1.1.667.036188a82 pkgrel=1 pkgdesc="Git for Windows extra files" arch=('any')