submodule deinit: unset core.worktree
When a submodule is deinit'd, the working tree is gone, so the setting of core.worktree is bogus. Unset it. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
e98317508c
commit
984cd77ddb
@ -991,6 +991,11 @@ test_expect_success 'submodule deinit should remove the whole submodule section
|
||||
rmdir init
|
||||
'
|
||||
|
||||
test_expect_success 'submodule deinit should unset core.worktree' '
|
||||
test_path_is_file .git/modules/example/config &&
|
||||
test_must_fail git config -f .git/modules/example/config core.worktree
|
||||
'
|
||||
|
||||
test_expect_success 'submodule deinit from subdirectory' '
|
||||
git submodule update --init &&
|
||||
git config submodule.example.foo bar &&
|
||||
|
Reference in New Issue
Block a user