threads / patch / 5648

patchQuote arguments to tr in test-lib

Subject: [PATCH] Quote arguments to tr in test-lib

## tl;dr

One message between Sep 22, 2006 and Sep 22, 2006. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Robin Rosenberg· Sep 22, 2006, 22:35 UTC · lore
From: Robin Rosenberg <robin.rosenberg@dewire.com>

When there are single-character filenames in the test directory, the shell tries to expand regexps meant for tr. ---

 t/test-lib.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to t/test-lib.sh +1 −1
diff --git a/t/test-lib.sh b/t/test-lib.sh
index e262933..e75ad5f 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -34,7 +34,7 @@ export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME
 export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME
 export EDITOR VISUAL
 
-case $(echo $GIT_TRACE |tr [A-Z] [a-z]) in
+case $(echo $GIT_TRACE |tr "[A-Z]" "[a-z]") in
 	1|2|true)
 		echo "* warning: Some tests will not work if GIT_TRACE" \
 			"is set as to trace on STDERR ! *"

← back to recent threads