558
558
test_expect_success " section was removed properly" \
559
559
" test_cmp expect .git/config"
560
560
561
- rm .git/config
562
-
563
561
cat > expect << EOF
564
562
[gitcvs]
565
563
enabled = true
570
568
571
569
test_expect_success ' section ending' '
572
570
571
+ rm -f .git/config &&
573
572
git config gitcvs.enabled true &&
574
573
git config gitcvs.ext.dbname %Ggitcvs1.%a.%m.sqlite &&
575
574
git config gitcvs.dbname %Ggitcvs2.%a.%m.sqlite &&
@@ -642,8 +641,6 @@ test_expect_success 'invalid bool (set)' '
642
641
643
642
test_must_fail git config --bool bool.nobool foobar'
644
643
645
- rm .git/config
646
-
647
644
cat > expect << \EOF
648
645
[bool]
649
646
true1 = true
658
655
659
656
test_expect_success ' set --bool' '
660
657
658
+ rm -f .git/config &&
661
659
git config --bool bool.true1 01 &&
662
660
git config --bool bool.true2 -1 &&
663
661
git config --bool bool.true3 YeS &&
@@ -668,8 +666,6 @@ test_expect_success 'set --bool' '
668
666
git config --bool bool.false4 FALSE &&
669
667
cmp expect .git/config'
670
668
671
- rm .git/config
672
-
673
669
cat > expect << \EOF
674
670
[int]
675
671
val1 = 1
@@ -679,13 +675,12 @@ EOF
679
675
680
676
test_expect_success ' set --int' '
681
677
678
+ rm -f .git/config &&
682
679
git config --int int.val1 01 &&
683
680
git config --int int.val2 -1 &&
684
681
git config --int int.val3 5m &&
685
682
cmp expect .git/config'
686
683
687
- rm .git/config
688
-
689
684
cat > expect << \EOF
690
685
[bool]
691
686
true1 = true
@@ -699,6 +694,7 @@ cat >expect <<\EOF
699
694
EOF
700
695
701
696
test_expect_success ' get --bool-or-int' '
697
+ rm -f .git/config &&
702
698
(
703
699
echo "[bool]"
704
700
echo true1
@@ -718,7 +714,6 @@ test_expect_success 'get --bool-or-int' '
718
714
719
715
'
720
716
721
- rm .git/config
722
717
cat > expect << \EOF
723
718
[bool]
724
719
true1 = true
@@ -732,6 +727,7 @@ cat >expect <<\EOF
732
727
EOF
733
728
734
729
test_expect_success ' set --bool-or-int' '
730
+ rm -f .git/config &&
735
731
git config --bool-or-int bool.true1 true &&
736
732
git config --bool-or-int bool.false1 false &&
737
733
git config --bool-or-int bool.true2 yes &&
@@ -742,8 +738,6 @@ test_expect_success 'set --bool-or-int' '
742
738
test_cmp expect .git/config
743
739
'
744
740
745
- rm .git/config
746
-
747
741
cat > expect << \EOF
748
742
[path]
749
743
home = ~/
@@ -752,6 +746,7 @@ cat >expect <<\EOF
752
746
EOF
753
747
754
748
test_expect_success NOT_MINGW ' set --path' '
749
+ rm -f .git/config &&
755
750
git config --path path.home "~/" &&
756
751
git config --path path.normal "/dev/null" &&
757
752
git config --path path.trailingtilde "foo~" &&
@@ -800,7 +795,7 @@ cat > expect << EOF
800
795
hash = "test#test"
801
796
EOF
802
797
test_expect_success ' quoting' '
803
- rm .git/config &&
798
+ rm -f .git/config &&
804
799
git config quote.leading " test" &&
805
800
git config quote.ending "test " &&
806
801
git config quote.semicolon "test;test" &&
0 commit comments