threads / patch / 40925

patchFix quoting of redirect in test script

Subject: [PATCH] Fix quoting of redirect in test script

## tl;dr

3 messages between Dec 2, 2015 and Dec 4, 2015. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Charles Bailey· Dec 2, 2015, 20:50 UTC · lore
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".

Show changes to t/t3404-rebase-interactive.sh +1 −1
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
Charles Bailey· Dec 4, 2015, 21:39 UTC · re: Junio C Hamano · lore

Re: [PATCH] Fix quoting of redirect in test script

On Fri, Dec 04, 2015 at 01:05:20PM -0800, Junio C Hamano wrote:
> Do you want to sign-off this patch?
> 
> Thanks.
Oops, yes please.
Signed-off-by: Charles Bailey <cbailey32@bloomberg.net>

← back to recent threads