Skip to content

Commit 21bb385

Browse files
committed
Merge branch 'gc/document-config-worktree-scope'
Doc update. * gc/document-config-worktree-scope: config: document and test the 'worktree' scope
2 parents da48270 + db7961e commit 21bb385

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Documentation/git-config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ Valid `<type>`'s include:
248248
--show-scope::
249249
Similar to `--show-origin` in that it augments the output of
250250
all queried config options with the scope of that value
251-
(local, global, system, command).
251+
(worktree, local, global, system, command).
252252

253253
--get-colorbool <name> [<stdout-is-tty>]::
254254

t/t1300-config.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2024,8 +2024,17 @@ test_expect_success '--show-scope with --list' '
20242024
local user.override=local
20252025
local include.path=../include/relative.include
20262026
local user.relative=include
2027+
local core.repositoryformatversion=1
2028+
local extensions.worktreeconfig=true
2029+
worktree user.worktree=true
20272030
command user.cmdline=true
20282031
EOF
2032+
git worktree add wt1 &&
2033+
# We need these to test for worktree scope, but outside of this
2034+
# test, this is just noise
2035+
test_config core.repositoryformatversion 1 &&
2036+
test_config extensions.worktreeConfig true &&
2037+
git config --worktree user.worktree true &&
20292038
git -c user.cmdline=true config --list --show-scope >output &&
20302039
test_cmp expect output
20312040
'

0 commit comments

Comments
 (0)