summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorManuel Boni <ziosombrero@gmail.com>2022-07-16 20:13:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-07-17 21:23:42 (GMT)
commit07aed5801722635684b5f0f8f3c26903fdd11f8e (patch)
tree31e7996c8f34c9a966b67b9b58fe5e4107a50cd1 /t
parent359da658ae32d9a7e5e93ac173fc221352b62917 (diff)
downloadgit-07aed5801722635684b5f0f8f3c26903fdd11f8e.zip
git-07aed5801722635684b5f0f8f3c26903fdd11f8e.tar.gz
git-07aed5801722635684b5f0f8f3c26903fdd11f8e.tar.bz2
config.txt: document include, includeIf
Git config's tab completion does not yet know about the "include" and "includeIf" sections, nor the related "path" variable. Add a description for these two sections in 'Documentation/config/includeif.txt', which points to git-config's documentation, specifically the "Includes" and "Conditional Includes" subsections. As a side effect, tab completion can successfully complete the 'include', 'includeIf', and 'include.add' expressions. This effect is tested by two new ad-hoc tests. Variable completion only works for "include" for now. Credit for the ideas behind this patch goes to Ævar Arnfjörð Bjarmason. Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Manuel Boni <ziosombrero@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t9902-completion.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index 98c6280..80cc11e 100755
--- a/t/t9902-completion.sh
+++ b/t/t9902-completion.sh
@@ -2330,6 +2330,13 @@ test_expect_success 'git config - section' '
EOF
'
+test_expect_success 'git config - section include, includeIf' '
+ test_completion "git config inclu" <<-\EOF
+ include.Z
+ includeIf.Z
+ EOF
+'
+
test_expect_success 'git config - variable name' '
test_completion "git config log.d" <<-\EOF
log.date Z
@@ -2338,6 +2345,12 @@ test_expect_success 'git config - variable name' '
EOF
'
+test_expect_success 'git config - variable name include' '
+ test_completion "git config include.p" <<-\EOF
+ include.path Z
+ EOF
+'
+
test_expect_success 'git config - value' '
test_completion "git config color.pager " <<-\EOF
false Z