summaryrefslogtreecommitdiff
path: root/t/t2404-worktree-config.sh
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2020-06-05 09:10:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-06-05 17:13:30 (GMT)
commit98564d805938cae8b72687a9e39d65b00ac7ad27 (patch)
tree78a12f098bdac401631df84dbf1c681b5d1991d7 /t/t2404-worktree-config.sh
parent01bbbbd9daaa277a95ae46e5a32f6fba026610ac (diff)
downloadgit-98564d805938cae8b72687a9e39d65b00ac7ad27.zip
git-98564d805938cae8b72687a9e39d65b00ac7ad27.tar.gz
git-98564d805938cae8b72687a9e39d65b00ac7ad27.tar.bz2
sparse-checkout: upgrade repository to version 1 when enabling extension
The 'extensions' configuration variable gets special meaning in the new repository version, so when enabling the extension we should upgrade the repository to version 1. Signed-off-by: Xin Li <delphij@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2404-worktree-config.sh')
-rwxr-xr-xt/t2404-worktree-config.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/t2404-worktree-config.sh b/t/t2404-worktree-config.sh
index 286121d..9536d10 100755
--- a/t/t2404-worktree-config.sh
+++ b/t/t2404-worktree-config.sh
@@ -23,8 +23,10 @@ test_expect_success 'config --worktree without extension' '
'
test_expect_success 'enable worktreeConfig extension' '
+ git config core.repositoryformatversion 1 &&
git config extensions.worktreeConfig true &&
- test_cmp_config true extensions.worktreeConfig
+ test_cmp_config true extensions.worktreeConfig &&
+ test_cmp_config 1 core.repositoryformatversion
'
test_expect_success 'config is shared as before' '