@@ -522,7 +522,7 @@ test_expect_success 'B: fail on invalid committer (5)' '
522
522
test_must_fail git fast-import <input
523
523
'
524
524
525
- test_expect_success ' B: fail on invalid file path' '
525
+ test_expect_success ' B: fail on invalid file path of .. ' '
526
526
cat >input <<-INPUT_END &&
527
527
blob
528
528
mark :1
@@ -542,6 +542,86 @@ test_expect_success 'B: fail on invalid file path' '
542
542
test_must_fail git fast-import <input
543
543
'
544
544
545
+ test_expect_success ' B: fail on invalid file path of .' '
546
+ cat >input <<-INPUT_END &&
547
+ blob
548
+ mark :1
549
+ data <<EOF
550
+ File contents
551
+ EOF
552
+
553
+ commit refs/heads/badpath
554
+ committer Name <email> $GIT_COMMITTER_DATE
555
+ data <<COMMIT
556
+ Commit Message
557
+ COMMIT
558
+ M 100644 :1 ./invalid-path
559
+ INPUT_END
560
+
561
+ test_when_finished "git update-ref -d refs/heads/badpath" &&
562
+ test_must_fail git fast-import <input
563
+ '
564
+
565
+ test_expect_success WINDOWS ' B: fail on invalid file path of C:' '
566
+ cat >input <<-INPUT_END &&
567
+ blob
568
+ mark :1
569
+ data <<EOF
570
+ File contents
571
+ EOF
572
+
573
+ commit refs/heads/badpath
574
+ committer Name <email> $GIT_COMMITTER_DATE
575
+ data <<COMMIT
576
+ Commit Message
577
+ COMMIT
578
+ M 100644 :1 C:/invalid-path
579
+ INPUT_END
580
+
581
+ test_when_finished "git update-ref -d refs/heads/badpath" &&
582
+ test_must_fail git fast-import <input
583
+ '
584
+
585
+ test_expect_success ' B: fail on invalid file path of .git' '
586
+ cat >input <<-INPUT_END &&
587
+ blob
588
+ mark :1
589
+ data <<EOF
590
+ File contents
591
+ EOF
592
+
593
+ commit refs/heads/badpath
594
+ committer Name <email> $GIT_COMMITTER_DATE
595
+ data <<COMMIT
596
+ Commit Message
597
+ COMMIT
598
+ M 100644 :1 .git/invalid-path
599
+ INPUT_END
600
+
601
+ test_when_finished "git update-ref -d refs/heads/badpath" &&
602
+ test_must_fail git fast-import <input
603
+ '
604
+
605
+ test_expect_success ' B: fail on invalid file path of .gitmodules' '
606
+ cat >input <<-INPUT_END &&
607
+ blob
608
+ mark :1
609
+ data <<EOF
610
+ File contents
611
+ EOF
612
+
613
+ commit refs/heads/badpath
614
+ committer Name <email> $GIT_COMMITTER_DATE
615
+ data <<COMMIT
616
+ Commit Message
617
+ COMMIT
618
+ M 120000 :1 .gitmodules
619
+ INPUT_END
620
+
621
+ test_when_finished "git update-ref -d refs/heads/badpath" &&
622
+ test_must_fail git fast-import <input
623
+ '
624
+
545
625
# ##
546
626
# ## series C
547
627
# ##
@@ -966,7 +1046,7 @@ test_expect_success 'L: verify internal tree sorting' '
966
1046
:100644 100644 M ba
967
1047
EXPECT_END
968
1048
969
- git fast-import <input &&
1049
+ git -c core.protectNTFS=false fast-import <input &&
970
1050
GIT_PRINT_SHA1_ELLIPSIS="yes" git diff-tree --abbrev --raw L^ L >output &&
971
1051
cut -d" " -f1,2,5 output >actual &&
972
1052
test_cmp expect actual
@@ -3117,7 +3197,7 @@ test_path_eol_success () {
3117
3197
test_expect_success " S: paths at EOL with $test must work" '
3118
3198
test_when_finished "git branch -D S-path-eol" &&
3119
3199
3120
- git fast-import --export-marks=marks.out <<-EOF >out 2>err &&
3200
+ git -c core.protectNTFS=false fast-import --export-marks=marks.out <<-EOF >out 2>err &&
3121
3201
blob
3122
3202
mark :401
3123
3203
data <<BLOB
@@ -3226,7 +3306,7 @@ test_path_space_success () {
3226
3306
test_expect_success " S: paths before space with $test must work" '
3227
3307
test_when_finished "git branch -D S-path-space" &&
3228
3308
3229
- git fast-import --export-marks=marks.out <<-EOF 2>err &&
3309
+ git -c core.protectNTFS=false fast-import --export-marks=marks.out <<-EOF 2>err &&
3230
3310
blob
3231
3311
mark :401
3232
3312
data <<BLOB
0 commit comments