Skip to contentSkip to conversation

Quote arguments to tr in test-lib

PATCH New Robin Rosenberg 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Quote arguments to tr in test-lib

From: Robin Rosenberg <[email protected]>

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(-)
t/test-lib.sh +1 -1
index e262933..e75ad5f 100755
@@ -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 ! *"