t6130/t9350: prepare for stringent Win32 path validation
On Windows, file names cannot contain asterisks nor newline characters. In an upcoming commit, we will make this limitation explicit, disallowing even the creation of commits that introduce such file names. However, in the test scripts touched by this patch, we _know_ that those paths won't be checked out, so we _want_ to allow such file names. Happily, the stringent path validation will be guarded via the `core.protectNTFS` flag, so all we need to do is to force that flag off temporarily. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Johannes Schindelin committed
Sep 9, 2019 at 15:43 UTC
35edce205615c553fdc49bcf10b0c91f061c56c9
2 files changed
+2
-1
t/t6130-pathspec-noglob.sh
+1
@@ -10,6 +10,7 @@ test_expect_success 'create commits with glob characters' '
10
# the name "f*" in the worktree, because it is not allowed
11
# on Windows (the tests below do not depend on the presence
12
# of the file in the worktree)
13
+ git config core.protectNTFS false &&
14
git update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:foo)" "f*" &&
15
test_tick &&
16
git commit -m star &&
t/t9350-fast-export.sh
+1
-1
@@ -424,7 +424,7 @@ test_expect_success 'fast-export quotes pathnames' '
424
test_config -C crazy-paths core.protectNTFS false &&
425
(cd crazy-paths &&
426
blob=$(echo foo | git hash-object -w --stdin) &&
427
- git update-index --add \
427
+ git -c core.protectNTFS=false update-index --add \
428
--cacheinfo 100644 $blob "$(printf "path with\\nnewline")" \
429
--cacheinfo 100644 $blob "path with \"quote\"" \
430
--cacheinfo 100644 $blob "path with \\backslash" \