config: document and test the 'worktree' scope
Test that "git config --show-scope" shows the "worktree" scope, and add it to the list of scopes in Documentation/git-config.txt. "git config --help" does not need to be updated because it already mentions "worktree". Signed-off-by: Glen Choo <chooglen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
e54793a95a
commit
db7961e6a6
@ -2024,8 +2024,17 @@ test_expect_success '--show-scope with --list' '
|
||||
local user.override=local
|
||||
local include.path=../include/relative.include
|
||||
local user.relative=include
|
||||
local core.repositoryformatversion=1
|
||||
local extensions.worktreeconfig=true
|
||||
worktree user.worktree=true
|
||||
command user.cmdline=true
|
||||
EOF
|
||||
git worktree add wt1 &&
|
||||
# We need these to test for worktree scope, but outside of this
|
||||
# test, this is just noise
|
||||
test_config core.repositoryformatversion 1 &&
|
||||
test_config extensions.worktreeConfig true &&
|
||||
git config --worktree user.worktree true &&
|
||||
git -c user.cmdline=true config --list --show-scope >output &&
|
||||
test_cmp expect output
|
||||
'
|
||||
|
Reference in New Issue
Block a user