@@ -2742,30 +2742,58 @@ do
2742
2742
'
2743
2743
done
2744
2744
2745
- test_expect_success ' git config - section' '
2746
- test_completion "git config br" <<-\EOF
2745
+ test_expect_success ' git config subcommand' '
2746
+ test_completion "git config " <<-\EOF
2747
+ edit Z
2748
+ get Z
2749
+ list Z
2750
+ remove-section Z
2751
+ rename-section Z
2752
+ set Z
2753
+ unset Z
2754
+ EOF
2755
+ '
2756
+
2757
+ test_expect_success ' git config subcommand options' '
2758
+ test_completion "git config get --show-" <<-\EOF
2759
+ --show-names Z
2760
+ --show-origin Z
2761
+ --show-scope Z
2762
+ EOF
2763
+ '
2764
+
2765
+ test_expect_success ' git config get' '
2766
+ test_when_finished "rm -f cfgfile" &&
2767
+ git config set --file cfgfile foo.bar baz &&
2768
+ test_completion "git config get --file cfgfile foo." <<-\EOF
2769
+ foo.bar Z
2770
+ EOF
2771
+ '
2772
+
2773
+ test_expect_success ' git config set - section' '
2774
+ test_completion "git config set br" <<-\EOF
2747
2775
branch.Z
2748
2776
browser.Z
2749
2777
EOF
2750
2778
'
2751
2779
2752
- test_expect_success ' git config - section include, includeIf' '
2753
- test_completion "git config inclu" <<-\EOF
2780
+ test_expect_success ' git config set - section include, includeIf' '
2781
+ test_completion "git config set inclu" <<-\EOF
2754
2782
include.Z
2755
2783
includeIf.Z
2756
2784
EOF
2757
2785
'
2758
2786
2759
- test_expect_success ' git config - variable name' '
2760
- test_completion "git config log.d" <<-\EOF
2787
+ test_expect_success ' git config set - variable name' '
2788
+ test_completion "git config set log.d" <<-\EOF
2761
2789
log.date Z
2762
2790
log.decorate Z
2763
2791
log.diffMerges Z
2764
2792
EOF
2765
2793
'
2766
2794
2767
- test_expect_success ' git config - variable name include' '
2768
- test_completion "git config include.p" <<-\EOF
2795
+ test_expect_success ' git config set - variable name include' '
2796
+ test_completion "git config set include.p" <<-\EOF
2769
2797
include.path Z
2770
2798
EOF
2771
2799
'
@@ -2776,8 +2804,8 @@ test_expect_success 'setup for git config submodule tests' '
2776
2804
git submodule add ./sub
2777
2805
'
2778
2806
2779
- test_expect_success ' git config - variable name - submodule and __git_compute_first_level_config_vars_for_section' '
2780
- test_completion "git config submodule." <<-\EOF
2807
+ test_expect_success ' git config set - variable name - submodule and __git_compute_first_level_config_vars_for_section' '
2808
+ test_completion "git config set submodule." <<-\EOF
2781
2809
submodule.active Z
2782
2810
submodule.alternateErrorStrategy Z
2783
2811
submodule.alternateLocation Z
@@ -2788,8 +2816,8 @@ test_expect_success 'git config - variable name - submodule and __git_compute_fi
2788
2816
EOF
2789
2817
'
2790
2818
2791
- test_expect_success ' git config - variable name - __git_compute_second_level_config_vars_for_section' '
2792
- test_completion "git config submodule.sub." <<-\EOF
2819
+ test_expect_success ' git config set - variable name - __git_compute_second_level_config_vars_for_section' '
2820
+ test_completion "git config set submodule.sub." <<-\EOF
2793
2821
submodule.sub.url Z
2794
2822
submodule.sub.update Z
2795
2823
submodule.sub.branch Z
@@ -2799,8 +2827,8 @@ test_expect_success 'git config - variable name - __git_compute_second_level_con
2799
2827
EOF
2800
2828
'
2801
2829
2802
- test_expect_success ' git config - value' '
2803
- test_completion "git config color.pager " <<-\EOF
2830
+ test_expect_success ' git config set - value' '
2831
+ test_completion "git config set color.pager " <<-\EOF
2804
2832
false Z
2805
2833
true Z
2806
2834
EOF
0 commit comments