From 984cd77ddbf0eea7371a18ad7124120473b6bb2d Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Mon, 18 Jun 2018 17:06:08 -0700 Subject: 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 Signed-off-by: Junio C Hamano --- t/t7400-submodule-basic.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 't/t7400-submodule-basic.sh') diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index 2f532529b8..1a33040d94 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -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 && -- cgit v1.2.3