Fix tests breaking when checkout path contains shell metacharacters
[gitweb.git] / t / t7003-filter-branch.sh
index efd658adb6d6327863f430b10ab65aa3f112f996..fd0903020844c87df3e45132810c5fae7d25a2d3 100755 (executable)
@@ -125,7 +125,7 @@ test_expect_success 'use index-filter to move into a subdirectory' '
                 "git ls-files -s | sed \"s-\\t-&newsubdir/-\" |
                  GIT_INDEX_FILE=\$GIT_INDEX_FILE.new \
                        git update-index --index-info &&
-                 mv \$GIT_INDEX_FILE.new \$GIT_INDEX_FILE" directorymoved &&
+                 mv \"\$GIT_INDEX_FILE.new\" \"\$GIT_INDEX_FILE\"" directorymoved &&
        test -z "$(git diff HEAD directorymoved:newsubdir)"'
 
 test_expect_success 'stops when msg filter fails' '