Skip to content

Commit d169785

Browse files
committed
Merge branch 'mb/config-document-include' into maint
Add missing documentation for "include" and "includeIf" features in "git config" file format, which incidentally teaches the command line completion to include them in its offerings. source: <[email protected]> * mb/config-document-include: config.txt: document include, includeIf
2 parents a751631 + 07aed58 commit d169785

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

Documentation/config.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,8 @@ include::config/i18n.txt[]
445445

446446
include::config/imap.txt[]
447447

448+
include::config/includeif.txt[]
449+
448450
include::config/index.txt[]
449451

450452
include::config/init.txt[]

Documentation/config/includeif.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include.path::
2+
includeIf.<condition>.path::
3+
Special variables to include other configuration files. See
4+
the "CONFIGURATION FILE" section in the main
5+
linkgit:git-config[1] documentation,
6+
specifically the "Includes" and "Conditional Includes" subsections.

t/t9902-completion.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2485,6 +2485,13 @@ test_expect_success 'git config - section' '
24852485
EOF
24862486
'
24872487

2488+
test_expect_success 'git config - section include, includeIf' '
2489+
test_completion "git config inclu" <<-\EOF
2490+
include.Z
2491+
includeIf.Z
2492+
EOF
2493+
'
2494+
24882495
test_expect_success 'git config - variable name' '
24892496
test_completion "git config log.d" <<-\EOF
24902497
log.date Z
@@ -2493,6 +2500,12 @@ test_expect_success 'git config - variable name' '
24932500
EOF
24942501
'
24952502

2503+
test_expect_success 'git config - variable name include' '
2504+
test_completion "git config include.p" <<-\EOF
2505+
include.path Z
2506+
EOF
2507+
'
2508+
24962509
test_expect_success 'git config - value' '
24972510
test_completion "git config color.pager " <<-\EOF
24982511
false Z

0 commit comments

Comments
 (0)