From: "René Scharfe" <l.s.r@web•de>
To: Git List <git@vger•kernel.org>
Subject: [PATCH v2] t4014: support Git version strings with spaces
Date: Sat, 13 Dec 2025 10:40:42 +0100 [thread overview]
Message-ID: <b79cba1d-f32b-4034-979e-fb9528d05f18@web.de> (raw)
In-Reply-To: <eb0e6533-44ef-4b85-b1aa-f43f6d4174a4@web.de>
git --version reports its version with the prefix "git version ".
Remove precisely this string instead of everything up to and including
the rightmost space to avoid butchering version strings that contain
spaces. This helps Apple's release of Git, which reports its version
like this: "git version 2.50.1 (Apple Git-155)".
Signed-off-by: René Scharfe <l.s.r@web•de>
---
Changes since v1:
- fix description of current removal pattern in commit message
t/t4014-format-patch.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 2782b1fc18..21d6d0cd9e 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -980,7 +980,7 @@ test_expect_success 'format-patch --ignore-if-in-upstream HEAD' '
test_expect_success 'get git version' '
git_version=$(git --version) &&
- git_version=${git_version##* }
+ git_version=${git_version#git version }
'
signature() {
--
2.52.0
prev parent reply other threads:[~2025-12-13 9:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-13 8:03 [PATCH] t4014: support Git version strings with spaces René Scharfe
2025-12-13 8:42 ` Junio C Hamano
2025-12-13 8:49 ` René Scharfe
2025-12-13 9:40 ` René Scharfe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b79cba1d-f32b-4034-979e-fb9528d05f18@web.de \
--to=l.s.r@web$(echo .)de \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox