git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 13/16] t3700: Skip a test with backslashes in pathspec
Date: Sat, 21 Mar 2009 16:14:20 -0700	[thread overview]
Message-ID: <7v3ad6cvub.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <6acd113f60d1b0e7926386f3aebe5d72ad362034.1237667830.git.j6t@kdbg.org> (Johannes Sixt's message of "Sat, 21 Mar 2009 22:26:36 +0100")

Johannes Sixt <j6t@kdbg.org> writes:

> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
> ---
>  t/t3700-add.sh |    2 +-
>  t/test-lib.sh  |    2 ++
>  2 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/t/t3700-add.sh b/t/t3700-add.sh
> index dc17d9f..050de42 100755
> --- a/t/t3700-add.sh
> +++ b/t/t3700-add.sh
> @@ -222,7 +222,7 @@ test_expect_success POSIXPERM 'git add (add.ignore-errors = false)' '
>  	! ( git ls-files foo1 | grep foo1 )
>  '
>  
> -test_expect_success 'git add '\''fo\[ou\]bar'\'' ignores foobar' '
> +test_expect_success BSLASHPSPEC "git add 'fo\\[ou\\]bar' ignores foobar" '
>  	git reset --hard &&
>  	touch fo\[ou\]bar foobar &&
>  	git add '\''fo\[ou\]bar'\'' &&

I do not think the justification for this change is explained well enough.

The test prepares a file whose name consists of "ef, oh, bra, oh, you,
ket, bee, ei and are" (no backslashes), and passes a filespec that quotes
bra and ket with backslash so glob won't misinterpret as if we are asking
to add "ef oh followed by either oh or you followed by bee ei are".  There
is no path that has a backslash in it involved.

If this does not work on Windows, there is something else going on.  Is it
that the shell eats one level of backslash too much or something?

  reply	other threads:[~2009-03-21 23:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-21 21:26 [PATCH 00/16] Tests on Windows - main part Johannes Sixt
2009-03-21 21:26 ` [PATCH 01/16] test-lib: Work around incompatible sort and find on Windows Johannes Sixt
2009-03-21 21:26 ` [PATCH 02/16] test-lib: Work around missing sum " Johannes Sixt
2009-03-21 21:26 ` [PATCH 03/16] Tests on Windows: $(pwd) must return Windows-style paths Johannes Sixt
2009-03-21 21:26 ` [PATCH 04/16] t0050: Check whether git init detected symbolic link support correctly Johannes Sixt
2009-03-21 21:26 ` [PATCH 05/16] test-lib: Infrastructure to test and check for prerequisites Johannes Sixt
2009-03-21 23:16   ` Junio C Hamano
2009-03-21 21:26 ` [PATCH 06/16] t3600: Use test prerequisite tags Johannes Sixt
2009-03-21 23:15   ` Junio C Hamano
2009-03-21 21:26 ` [PATCH 07/16] Skip tests that fail if the executable bit is not handled by the filesystem Johannes Sixt
2009-03-21 21:26 ` [PATCH 08/16] t5302: Use prerequisite tags to skip 64-bit offset tests Johannes Sixt
2009-03-21 21:26 ` [PATCH 09/16] t9100, t9129: Use prerequisite tags for UTF-8 tests Johannes Sixt
2009-03-21 21:26 ` [PATCH 10/16] Use prerequisite tags to skip tests that depend on symbolic links Johannes Sixt
2009-03-21 21:26 ` [PATCH 11/16] t0060: Fix tests on Windows Johannes Sixt
2009-03-21 21:26 ` [PATCH 12/16] Skip tests that require a filesystem that obeys POSIX permissions Johannes Sixt
2009-03-21 21:26 ` [PATCH 13/16] t3700: Skip a test with backslashes in pathspec Johannes Sixt
2009-03-21 23:14   ` Junio C Hamano [this message]
2009-03-22 16:55     ` Johannes Sixt
2009-03-22 21:59       ` Junio C Hamano
2009-03-21 21:26 ` [PATCH 14/16] Use prerequisites to skip tests that need unzip Johannes Sixt
2009-03-21 21:26 ` [PATCH 15/16] t7004: Use prerequisite tags to skip tests that need gpg Johannes Sixt
2009-03-21 21:26 ` [PATCH 16/16] t5503: GIT_DEBUG_SEND_PACK is not supported on MinGW Johannes Sixt
2009-03-21 21:41 ` [PATCH 00/16] Tests on Windows - main part Johannes Sixt

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

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

  git send-email \
    --in-reply-to=7v3ad6cvub.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    /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.
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 NNTP newsgroup(s).