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

Re: [PATCH] t0008: avoid brace expansion

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Jan 10, 2013, 21:24 UTC
Message-ID
<50EF31A4.3000205@lsrfire.ath.cx>
In-Reply-To
<7vsj693n6o.fsf@alter.siamese.dyndns.org>
Am 10.01.2013 01:18, schrieb Junio C Hamano:
Show 12 quoted lines
> 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
Previous: Adam SpiersNext: Greg Troxel
Message 9 of 11 in “t1402: work around shell quoting issue on NetBSD”
  1. t1402: work around shell quoting issue on NetBSDRené Scharfe, Jan 8, 2013
  2. Junio C HamanoJan 8, 2013
  3. René ScharfeJan 8, 2013
  4. Junio C HamanoJan 8, 2013
  5. t0008: avoid brace expansionRené Scharfe, Jan 9, 2013
  6. Adam SpiersJan 9, 2013
  7. Junio C HamanoJan 10, 2013
  8. Adam SpiersJan 10, 2013
  9. René ScharfeJan 10, 2013
  10. Greg TroxelJan 9, 2013
  11. Greg TroxelJan 9, 2013

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.