git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH nd/gitignore-trailing-whitespace] t0008: skip trailing space test on Windows

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Mar 11, 2014, 07:46 UTC
Message-ID
<531EBF60.90309@viscovery.net>
In-Reply-To
<xmqqfvmprfly.fsf@gitster.dls.corp.google.com>
From: Johannes Sixt <j6t@kdbg.org>

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 <j6t@kdbg.org>
---
 t/t0008-ignores.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh
index bbaf6b5..63beb99 100755
--- a/t/t0008-ignores.sh
+++ b/t/t0008-ignores.sh
@@ -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  " &&
-- 
1.9.0.1534.ga05fa03
Previous: Junio C HamanoNext: Duy Nguyen
Message 4 of 6 in “What's cooking in git.git (Mar 2014, #01; Tue, 4)”
  1. Junio C HamanoMar 5, 2014
  2. Johannes SixtMar 10, 2014
  3. Junio C HamanoMar 10, 2014
  4. t0008: skip trailing space test on WindowsJohannes Sixt, Mar 11, 2014
  5. Duy NguyenMar 12, 2014
  6. Jeff KingMar 14, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.