t0301: fixes for windows compatibility
commit0fdcfa2f9f59a8bf4202ac3933991f42a4ac1393
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>
Tue, 14 Sep 2021 07:25:58 +0000 (14 00:25 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 Sep 2021 16:30:53 +0000 (14 09:30 -0700)
treee7915833f509c81ad3b014ab76d6d2fb18a750e5
parent8b7c11b8668b4e774f81a9f0b4c30144b818f1d1
t0301: fixes for windows compatibility

In preparation for a future patch that will allow building with
Unix Sockets in Windows, workaround a couple of issues from the
Mingw-W64 compatibility layer.

test -S is not able to detect that a file is a socket, so use
test -e instead (through a library function).

`mkdir -m` can't represent a valid ACL directly and fails with
permission problems, so instead call mkdir followed by chmod, which
has been enhanced to do so.

The last invocation of mkdir would likely need the same treatment
but SYMLINK is unlikely to be enabled on Windows so it has been
punted for now.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0301-credential-cache.sh