Skip to content

Commit

Permalink
t0008: skip trailing space test on Windows
Browse files Browse the repository at this point in the history
The Windows API does not preserve file names with trailing spaces (and
dots), but rather strips them. Our tools (MSYS bash, git) base the POSIX
emulation on the Windows API. As a consequence, it is impossible for bash
on Windows to allocate a file whose name has trailing spaces, and for git
to stat such a file. Both operate on a file whose name has the spaces
stripped. Skip the test that needs such a file name.

Note that we do not use (another incarnation of) prerequisite FUNNYNAMES.
The reason is that FUNNYNAMES is intended to represent a property of the
file system. But the inability to have trailing spaces in a file name is
a property of the Windows API. The file system (NTFS) does not have this
limitation.

Signed-off-by: Johannes Sixt <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
j6t authored and gitster committed Mar 11, 2014
1 parent 7e2e4b3 commit 35e4d77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/t0008-ignores.sh
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ EOF
test_cmp err.expect err
'

test_expect_success 'quoting allows trailing whitespace' '
test_expect_success !MINGW 'quoting allows trailing whitespace' '
rm -rf whitespace &&
mkdir whitespace &&
>"whitespace/trailing " &&
Expand Down

0 comments on commit 35e4d77

Please sign in to comment.