git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH nd/gitignore-trailing-whitespace] t0008: skip trailing space test on Windows
Date: Tue, 11 Mar 2014 08:46:40 +0100	[thread overview]
Message-ID: <531EBF60.90309@viscovery.net> (raw)
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

  reply	other threads:[~2014-03-11  7:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05  0:10 What's cooking in git.git (Mar 2014, #01; Tue, 4) Junio C Hamano
2014-03-10  8:22 ` Johannes Sixt
2014-03-10 19:57   ` Junio C Hamano
2014-03-11  7:46     ` Johannes Sixt [this message]
2014-03-12 12:55 ` Duy Nguyen
2014-03-14  4:16   ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=531EBF60.90309@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).