diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-06-13 15:53:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-06-13 15:53:44 -0700 |
commit | 21bb3851ee3c6fe945ed17c10b79dc153418fcdf (patch) | |
tree | 2769bed56a2f2ea9eff26554926a59549ff5a18d | |
parent | da4827056acd8acac882fdfc93fd5b70472927ea (diff) | |
parent | db7961e6a69f648e8a1359c23830ff59d7341092 (diff) |
Merge branch 'gc/document-config-worktree-scope'
Doc update.
* gc/document-config-worktree-scope:
config: document and test the 'worktree' scope
-rw-r--r-- | Documentation/git-config.txt | 2 | ||||
-rwxr-xr-x | t/t1300-config.sh | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt index bdcfd94b64..9376e39aef 100644 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@ -248,7 +248,7 @@ Valid `<type>`'s include: --show-scope:: Similar to `--show-origin` in that it augments the output of all queried config options with the scope of that value - (local, global, system, command). + (worktree, local, global, system, command). --get-colorbool <name> [<stdout-is-tty>]:: 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 ' |