@@ -699,7 +699,7 @@ weird
699
699
EOF
700
700
701
701
test_expect_success ' rename section' '
702
- git config -- rename-section branch.eins branch.zwei
702
+ git config ${mode_prefix} rename-section branch.eins branch.zwei
703
703
'
704
704
705
705
cat > expect << EOF
@@ -718,7 +718,7 @@ test_expect_success 'rename succeeded' '
718
718
'
719
719
720
720
test_expect_success ' rename non-existing section' '
721
- test_must_fail git config -- rename-section \
721
+ test_must_fail git config ${mode_prefix} rename-section \
722
722
branch."world domination" branch.drei
723
723
'
724
724
@@ -727,7 +727,7 @@ test_expect_success 'rename succeeded' '
727
727
'
728
728
729
729
test_expect_success ' rename another section' '
730
- git config -- rename-section branch."1 234 blabl/a" branch.drei
730
+ git config ${mode_prefix} rename-section branch."1 234 blabl/a" branch.drei
731
731
'
732
732
733
733
cat > expect << EOF
@@ -750,7 +750,7 @@ cat >> .git/config << EOF
750
750
EOF
751
751
752
752
test_expect_success ' rename a section with a var on the same line' '
753
- git config -- rename-section branch.vier branch.zwei
753
+ git config ${mode_prefix} rename-section branch.vier branch.zwei
754
754
'
755
755
756
756
cat > expect << EOF
@@ -771,11 +771,11 @@ test_expect_success 'rename succeeded' '
771
771
'
772
772
773
773
test_expect_success ' renaming empty section name is rejected' '
774
- test_must_fail git config -- rename-section branch.zwei ""
774
+ test_must_fail git config ${mode_prefix} rename-section branch.zwei ""
775
775
'
776
776
777
777
test_expect_success ' renaming to bogus section is rejected' '
778
- test_must_fail git config -- rename-section branch.zwei "bogus name"
778
+ test_must_fail git config ${mode_prefix} rename-section branch.zwei "bogus name"
779
779
'
780
780
781
781
test_expect_success ' renaming a section with a long line' '
@@ -784,7 +784,7 @@ test_expect_success 'renaming a section with a long line' '
784
784
printf " c = d %1024s [a] e = f\\n" " " &&
785
785
printf "[a] g = h\\n"
786
786
} >y &&
787
- git config - f y --rename-section a xyz &&
787
+ git config ${mode_prefix}rename-section - f y a xyz &&
788
788
test_must_fail git config -f y b.e
789
789
'
790
790
@@ -794,7 +794,7 @@ test_expect_success 'renaming an embedded section with a long line' '
794
794
printf " c = d %1024s [a] [foo] e = f\\n" " " &&
795
795
printf "[a] g = h\\n"
796
796
} >y &&
797
- git config - f y --rename-section a xyz &&
797
+ git config ${mode_prefix}rename-section - f y a xyz &&
798
798
test_must_fail git config -f y foo.e
799
799
'
800
800
@@ -804,7 +804,7 @@ test_expect_success 'renaming a section with an overly-long line' '
804
804
printf " c = d %525000s e" " " &&
805
805
printf "[a] g = h\\n"
806
806
} >y &&
807
- test_must_fail git config - f y --rename-section a xyz 2>err &&
807
+ test_must_fail git config ${mode_prefix}rename-section - f y a xyz 2>err &&
808
808
grep "refusing to work with overly long line in .y. on line 2" err
809
809
'
810
810
@@ -2112,7 +2112,7 @@ test_expect_success POSIXPERM,PERL 'preserves existing permissions' '
2112
2112
git config imap.pass Hunter2 &&
2113
2113
perl -e \
2114
2114
"die q(badset) if ((stat(q(.git/config)))[2] & 07777) != 0600" &&
2115
- git config -- rename-section imap pop &&
2115
+ git config ${mode_prefix} rename-section imap pop &&
2116
2116
perl -e \
2117
2117
"die q(badrename) if ((stat(q(.git/config)))[2] & 07777) != 0600"
2118
2118
'
@@ -2601,7 +2601,7 @@ test_expect_success 'refuse --fixed-value for incompatible actions' '
2601
2601
test_must_fail git config --file=config --fixed-value --add dev.null bogus &&
2602
2602
test_must_fail git config --file=config --fixed-value --get-urlmatch dev.null bogus &&
2603
2603
test_must_fail git config --file=config --fixed-value --get-urlmatch dev.null bogus &&
2604
- test_must_fail git config -- file=config --fixed-value --rename-section dev null &&
2604
+ test_must_fail git config ${mode_prefix}rename-section -- file=config --fixed-value dev null &&
2605
2605
test_must_fail git config --file=config --fixed-value --remove-section dev &&
2606
2606
test_must_fail git config ${mode_prefix}list --file=config --fixed-value &&
2607
2607
test_must_fail git config --file=config --fixed-value --get-color dev.null &&
0 commit comments