aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthias Aßhauer <mha1993@live.de>2024-04-03 15:42:02 +0000
committerJunio C Hamano <gitster@pobox.com>2024-04-03 14:54:28 -0700
commit2406bf5fc5fbaa042e05fc0001ba72beb888d60f (patch)
tree055d689b470c41a1f1631a35c1fb4c2428210a90 /t
parentc75fd8d8150afdf836b63a8e0534d9b9e3e111ba (diff)
downloadgit-2406bf5fc5fbaa042e05fc0001ba72beb888d60f.tar.gz
Win32: detect unix socket support at runtime
Windows 10 build 17063 introduced support for unix sockets to Windows. bb390b1 (git-compat-util: include declaration for unix sockets in windows, 2021-09-14) introduced a way to build git with unix socket support on Windows, but you still had to decide at build time which Windows version the compiled executable was supposed to run on. We can detect at runtime wether the operating system supports unix sockets and act accordingly for all supported Windows versions. This fixes https://github.com/git-for-windows/git/issues/3892 Signed-off-by: Matthias Aßhauer <mha1993@live.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t0301-credential-cache.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t0301-credential-cache.sh b/t/t0301-credential-cache.sh
index 8300faadea..f2c146fa2a 100755
--- a/t/t0301-credential-cache.sh
+++ b/t/t0301-credential-cache.sh
@@ -8,6 +8,14 @@ test -z "$NO_UNIX_SOCKETS" || {
skip_all='skipping credential-cache tests, unix sockets not available'
test_done
}
+if test_have_prereq MINGW
+then
+ service_running=$(sc query afunix | grep "4 RUNNING")
+ test -z "$service_running" || {
+ skip_all='skipping credential-cache tests, unix sockets not available'
+ test_done
+ }
+fi
uname_s=$(uname -s)
case $uname_s in