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

[PATCH] Fix quoting of redirect in test script

From
Charles Bailey <charles@hashpling.org>
Date
Dec 2, 2015, 20:50 UTC
Message-ID
<1449089407-14921-1-git-send-email-charles@hashpling.org>
From: Charles Bailey <cbailey32@bloomberg.net>
---
 t/t3404-rebase-interactive.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

If you are using bash (at least 4.3.30 or 4.3.42) this actually causes an error due to an "ambiguous redirect" because there is a space in "trash directory".

diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 98eb49a..9067e02 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -1234,7 +1234,7 @@ test_expect_success 'tabs and spaces are accepted in the todolist' '
 		# Turn single spaces into space/tab mix
 		sed "1s/ /	/g; 2s/ /  /g; 3s/ / 	/g" "$1"
 		printf "\n\t# comment\n #more\n\t # comment\n"
-	) >$1.new
+	) >"$1.new"
 	mv "$1.new" "$1"
 	EOF
 	test_set_editor "$(pwd)/add-indent.sh" &&
-- 
2.4.0.53.g8440f74
Next: Junio C Hamano
Message 1 of 3 in “Fix quoting of redirect in test script”
  1. Fix quoting of redirect in test scriptCharles Bailey, Dec 2, 2015
  2. Junio C HamanoDec 4, 2015
  3. Charles BaileyDec 4, 2015

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.