]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t7501-commit.sh
Fix tests breaking when checkout path contains shell metacharacters
[thirdparty/git.git] / t / t7501-commit.sh
index c0288f345fb5809d8606f4d3cfaf73d24d6c7281..e5fdb638511e58e6206a5e44a873a8d3cfae7317 100755 (executable)
@@ -79,8 +79,8 @@ test_expect_success \
 
 cat >editor <<\EOF
 #!/bin/sh
-sed -e "s/a file/an amend commit/g" < $1 > $1-
-mv $1- $1
+sed -e "s/a file/an amend commit/g" < "$1" > "$1-"
+mv "$1-" "$1"
 EOF
 chmod 755 editor
 
@@ -99,8 +99,8 @@ test_expect_success \
 
 cat >editor <<\EOF
 #!/bin/sh
-sed -e "s/amend/older/g"  < $1 > $1-
-mv $1- $1
+sed -e "s/amend/older/g"  < "$1" > "$1-"
+mv "$1-" "$1"
 EOF
 chmod 755 editor