apply: force matching at the beginning.
[git.git] / t / t4102-apply-rename.sh
index f591a56..fbb508d 100755 (executable)
@@ -26,12 +26,17 @@ echo 'This is foo' >foo
 chmod +x foo
 
 test_expect_success setup \
-    'git-update-cache --add foo'
+    'git-update-index --add foo'
 
 test_expect_success apply \
     'git-apply --index --stat --summary --apply test-patch'
 
-test_expect_success validate \
-    'test -f bar && ls -l bar | grep "^-..x..x..x"'
+if [ "$(git repo-config --get core.filemode)" = false ]
+then
+       say 'filemode disabled on the filesystem'
+else
+       test_expect_success validate \
+           'test -f bar && ls -l bar | grep "^-..x......"'
+fi
 
 test_done