Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlen Choo <chooglen@google.com>2022-06-08 00:24:04 +0300
committerJunio C Hamano <gitster@pobox.com>2022-06-08 04:14:25 +0300
commitdb7961e6a69f648e8a1359c23830ff59d7341092 (patch)
treeeaf6bc1ff31979ffab9ef6aefb141009f17eb7c6 /t/t1300-config.sh
parente54793a95afeea1e10de1e5ad7eab914e7416250 (diff)
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>
Diffstat (limited to 't/t1300-config.sh')
-rwxr-xr-xt/t1300-config.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t1300-config.sh b/t/t1300-config.sh
index 7dd9b325d9..d3d9adbb3d 100755
--- a/t/t1300-config.sh
+++ b/t/t1300-config.sh
@@ -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
'