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>
This commit is contained in:

committed by
Junio C Hamano

parent
c75fd8d815
commit
2406bf5fc5
@ -149,6 +149,9 @@ int cmd_credential_cache(int argc, const char **argv, const char *prefix)
|
||||
usage_with_options(usage, options);
|
||||
op = argv[0];
|
||||
|
||||
if (!have_unix_sockets())
|
||||
die(_("credential-cache unavailable; no unix socket support"));
|
||||
|
||||
if (!socket_path)
|
||||
socket_path = get_socket_path();
|
||||
if (!socket_path)
|
||||
|
Reference in New Issue
Block a user