summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2025-12-13 10:40:42 +0100
committerJunio C Hamano <gitster@pobox.com>2025-12-14 15:50:44 +0900
commit007b8994d4fc49f4a68ee414db9e814736a3fc04 (patch)
treea7a4a90b6492378001723eb48e5f454532790776 /t
parent9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed (diff)
t4014: support Git version strings with spaces
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t4014-format-patch.sh2
1 files changed, 1 insertions, 1 deletions
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() {