git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Johannes Sixt <j.sixt@viscovery.net>,
	Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, Greg Brockman <gdb@MIT.EDU>,
	Ilari Liusvaara <ilari.liusvaara@elisanet.fi>,
	Elijah Newren <newren@gmail.com>
Subject: Re: jn/apply-filename-with-sp (Re: What's cooking in git.git (Aug 2010, #02; Wed, 11))
Date: Fri, 13 Aug 2010 23:44:50 +0200	[thread overview]
Message-ID: <4C65BCD2.6000701@kdbg.org> (raw)
In-Reply-To: <20100812224044.GK2029@burratino>

Am 13.08.2010 00:40, schrieb Jonathan Nieder:
> Johannes Sixt wrote:
>> Am 8/12/2010 1:35, schrieb Junio C Hamano:
>
>>> * jn/apply-filename-with-sp (2010-07-23) 4 commits
>>>   - apply: Handle traditional patches with space in filename
>>>   - t4135 (apply): use expand instead of pr for portability
>>>   - tests: Test how well "git apply" copes with weird filenames
>>>   - apply: Split quoted filename handling into new function
>>>
>>> Looked Ok.  Will merge to 'next'.
>>
>> The test cases that work with files with tabs must have a prerequisite;
>> see t3600-rm.sh.
>
> Would this work?
>
> -- 8<  --
> Subject: t4135 (apply): filenames with tabs are not usable on NTFS
>
> Move the code setting up the FUNNYNAMES prerequisite from
> v1.3.0-rc1~67 (workaround fat/ntfs deficiences for t3600-rm.sh,
> 2006-03-03) to test-lib and use it.
>
> Reported-by: Johannes Sixt<j6t@kdbg.org>
> Signed-off-by: Jonathan Nieder<jrnieder@gmail.com>

No, it needs this squashed in (warning, whitespace damaged), except that 
the prerequisite EXPAND is nowhere defined - it is only a hint for you(?) 
that we need something else there because we don't have expand on Windows.

I don't know why the test with quotes fails. It must be a bug in MSYS 
bash, because the file system does not have any problems with quotes in 
file names.

diff --git a/t/t4135-apply-weird-filenames.sh 
b/t/t4135-apply-weird-filenames.sh
index 5c7165e..6730a30 100755
--- a/t/t4135-apply-weird-filenames.sh
+++ b/t/t4135-apply-weird-filenames.sh
@@ -88,10 +88,10 @@ try_filename() {
  try_filename 'plain'            'postimage.txt'
  try_filename 'with spaces'      'post image.txt'
  try_filename 'with tab'         'post	image.txt' FUNNYNAMES
-try_filename 'with backslash'   'post\image.txt'
-try_filename 'with quote'       '"postimage".txt' '' success failure success
+try_filename 'with backslash'   'post\image.txt' BSLASHPSPEC
+try_filename 'with quote'       '"postimage".txt' FUNNYNAMES success 
failure success

-test_expect_success FULLDIFF 'whitespace-damaged traditional patch' '
+test_expect_success EXPAND,FULLDIFF 'whitespace-damaged traditional patch' '
  	reset_preimage &&
  	reset_subdirs &&
  	echo postimage >b/postimage.txt &&
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 1e5640b..d50e787 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -963,8 +963,8 @@ test -z "$NO_GETTEXT" && test_set_prereq GETTEXT
  f1='newline
  embedded'
  if
-	>"$f1" 2>/dev/null &&
-	>'tab	embedded' 2>/dev/null
+	{ >"$f1"; } 2>/dev/null &&
+	{ >'tab	embedded'; } 2>/dev/null
  then
  	test_set_prereq FUNNYNAMES
  fi

Without the braces in this check the error message is still printed. I 
didn't test whether just writing 2>/dev/null first would suppress it as well.

BTW, I would prefer to keep the test in t3600 and t4135, that it doesn't 
happen for every other test script unnecessarily.

-- Hannes

  parent reply	other threads:[~2010-08-13 21:44 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11 23:35 What's cooking in git.git (Aug 2010, #02; Wed, 11) Junio C Hamano
2010-08-12  1:41 ` Jonathan Nieder
2010-08-12  2:33   ` Ævar Arnfjörð Bjarmason
2010-08-12  3:15     ` jn/commit-no-change-wo-status (Re: What's cooking in git.git (Aug 2010, #02; Wed, 11)) Jonathan Nieder
2010-08-12  5:47 ` What's cooking in git.git (Aug 2010, #02; Wed, 11) Elijah Newren
2010-08-12 15:49   ` Junio C Hamano
2010-08-12 21:12     ` Elijah Newren
2010-08-12  9:23 ` Johannes Sixt
2010-08-12  9:37   ` Greg Brockman
2010-08-12 10:11     ` Ævar Arnfjörð Bjarmason
2010-08-12 22:08     ` Junio C Hamano
2010-08-12 22:13       ` Greg Brockman
2010-08-12 22:19       ` Junio C Hamano
2010-08-12 10:20   ` Ævar Arnfjörð Bjarmason
2010-08-12 11:35     ` Erik Faye-Lund
2010-08-12 16:50       ` Ævar Arnfjörð Bjarmason
2010-08-12 17:34         ` Chris Packham
2010-08-12 18:35           ` Ævar Arnfjörð Bjarmason
2010-08-12 22:19             ` windows smoke tester (was Re: What's cooking in git.git (Aug 2010, #02; Wed, 11)) Chris Packham
2010-08-12 22:29               ` Ævar Arnfjörð Bjarmason
2010-08-12 22:58                 ` Chris Packham
2010-08-13  1:01                   ` Ævar Arnfjörð Bjarmason
2010-08-14  0:42                     ` Chris Packham
2010-08-14  0:46                       ` Ævar Arnfjörð Bjarmason
2010-08-15  0:54                       ` Tay Ray Chuan
2010-08-15  1:08                         ` Ævar Arnfjörð Bjarmason
2010-08-15 17:39                           ` Tay Ray Chuan
2010-08-12 10:21   ` What's cooking in git.git (Aug 2010, #02; Wed, 11) Ilari Liusvaara
2010-08-12 10:31     ` Johannes Sixt
2010-08-12 15:25       ` Ilari Liusvaara
2010-08-12 12:43   ` Elijah Newren
2010-08-12 22:21     ` Junio C Hamano
2010-08-12 21:58   ` Junio C Hamano
2010-08-12 22:40   ` jn/apply-filename-with-sp (Re: What's cooking in git.git (Aug 2010, #02; Wed, 11)) Jonathan Nieder
2010-08-12 22:46     ` Ævar Arnfjörð Bjarmason
2010-08-12 23:17     ` Junio C Hamano
2010-08-13  0:59       ` Ævar Arnfjörð Bjarmason
2010-08-13 21:44     ` Johannes Sixt [this message]
2010-08-14  2:27       ` Jonathan Nieder
2010-08-14 18:37         ` Johannes Sixt
2010-08-15  0:05           ` Jonathan Nieder
2010-08-19  1:45           ` [PATCH v2 0/3] apply: handle traditional patches with space in filename Jonathan Nieder
2010-08-19  1:46             ` [PATCH 1/3] apply: split quoted filename handling into new function Jonathan Nieder
2010-08-19  1:48             ` [PATCH 2/3] tests: exercise "git apply" with weird filenames Jonathan Nieder
2010-08-19  1:50             ` [PATCH 3/3] apply: handle traditional patches with space in filename Jonathan Nieder
2010-08-19 19:56             ` [PATCH v2 0/3] " Johannes Sixt
2010-08-20  6:26               ` Jonathan Nieder
2010-08-13  0:08   ` jn/svn-fe Jonathan Nieder
2010-08-13 10:18     ` jn/svn-fe Jakub Narebski
2010-08-13 21:33     ` jn/svn-fe Johannes Sixt
2010-08-13 23:47       ` [PATCH v2 jn/svn-fe 0/5] vcs-svn: Port to Windows Jonathan Nieder
2010-08-13 23:59         ` [PATCH 1/5] compat: add strtok_r() Jonathan Nieder
2010-08-14  0:01         ` [PATCH 2/5] vcs-svn: Rename dirent pool to build on Windows Jonathan Nieder
2010-08-14  0:03         ` [PATCH 3/5] vcs-svn: Avoid %z in format string Jonathan Nieder
2010-08-14  0:04         ` [PATCH 4/5] t9010 (svn-fe): use Unix-style path in URI Jonathan Nieder
2010-08-14  0:06         ` [PATCH 5/5] t9010 (svn-fe): avoid symlinks in test Jonathan Nieder

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=4C65BCD2.6000701@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=gdb@MIT.EDU \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ilari.liusvaara@elisanet.fi \
    --cc=j.sixt@viscovery.net \
    --cc=jrnieder@gmail.com \
    --cc=newren@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).