Merge branch 'js/mingw-reserved-filenames'

Forbid pathnames that the platform's filesystem cannot represent on
MinGW.

* js/mingw-reserved-filenames:
  mingw: refuse paths containing reserved names
  mingw: short-circuit the conversion of `/dev/null` to UTF-16
This commit is contained in:
Junio C Hamano
2020-01-02 12:38:30 -08:00
3 changed files with 122 additions and 24 deletions

View File

@ -469,11 +469,14 @@ test_expect_success 'match .gitmodules' '
'
test_expect_success MINGW 'is_valid_path() on Windows' '
test-tool path-utils is_valid_path \
test-tool path-utils is_valid_path \
win32 \
"win32 x" \
../hello.txt \
C:\\git \
comm \
conout.c \
lptN \
\
--not \
"win32 " \
@ -481,7 +484,13 @@ test_expect_success MINGW 'is_valid_path() on Windows' '
"win32." \
"win32 . ." \
.../hello.txt \
colon:test
colon:test \
"AUX.c" \
"abc/conOut\$ .xyz/test" \
lpt8 \
"lpt*" \
Nul \
"PRN./abc"
'
test_done