git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
To: Junio C Hamano <gitster@pobox.com>
Cc: Adam Spiers <git@adamspiers.org>,
	git discussion list <git@vger.kernel.org>
Subject: Re: [PATCH] t0008: avoid brace expansion
Date: Thu, 10 Jan 2013 22:24:52 +0100	[thread overview]
Message-ID: <50EF31A4.3000205@lsrfire.ath.cx> (raw)
In-Reply-To: <7vsj693n6o.fsf@alter.siamese.dyndns.org>

Am 10.01.2013 01:18, schrieb Junio C Hamano:
> Adam Spiers <git@adamspiers.org> writes:
> 
>> On Wed, Jan 9, 2013 at 11:49 PM, René Scharfe
>> <rene.scharfe@lsrfire.ath.cx> wrote:
>>> Brace expansion is not required by POSIX and not supported by dash nor
>>> NetBSD's sh.  Explicitly list all combinations instead.
>>
>> Good catch, thanks!
> 
> Yeah; thanks.
> 
> It would also be nice to avoid touch while we are at it, by the way.

Good idea!  Replacement patch:

--- >8 ---
Brace expansion is a shell feature that's not required by POSIX and not
supported by dash nor NetBSD's sh.  Explicitly list all combinations
instead.  Also avoid calling touch by creating the test files with a
redirection instead, as suggested by Junio.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
---
 t/t0008-ignores.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh
index 9b0fcd6..d7df719 100755
--- a/t/t0008-ignores.sh
+++ b/t/t0008-ignores.sh
@@ -129,8 +129,13 @@ test_expect_success 'setup' '
 		one
 		ignored-*
 	EOF
-	touch {,a/}{not-ignored,ignored-{and-untracked,but-in-index}} &&
-	git add -f {,a/}ignored-but-in-index
+	for dir in . a
+	do
+		: >$dir/not-ignored &&
+		: >$dir/ignored-and-untracked &&
+		: >$dir/ignored-but-in-index
+	done &&
+	git add -f ignored-but-in-index a/ignored-but-in-index &&
 	cat <<-\EOF >a/.gitignore &&
 		two*
 		*three
-- 
1.8.0

  parent reply	other threads:[~2013-01-10 21:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-08 20:23 [PATCH] t1402: work around shell quoting issue on NetBSD René Scharfe
2013-01-08 20:39 ` Junio C Hamano
2013-01-08 21:13   ` René Scharfe
2013-01-08 21:37     ` Junio C Hamano
2013-01-09 23:49       ` [PATCH] t0008: avoid brace expansion René Scharfe
2013-01-09 23:56         ` Adam Spiers
2013-01-10  0:18           ` Junio C Hamano
2013-01-10  0:22             ` Adam Spiers
2013-01-10 21:24             ` René Scharfe [this message]
2013-01-09  1:27 ` [PATCH] t1402: work around shell quoting issue on NetBSD Greg Troxel
2013-01-09  2:07 ` Greg Troxel

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=50EF31A4.3000205@lsrfire.ath.cx \
    --to=rene.scharfe@lsrfire.ath.cx \
    --cc=git@adamspiers.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
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).