summaryrefslogtreecommitdiff
path: root/t/t7400-submodule-basic.sh
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-06-19 00:06:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-19 16:28:13 (GMT)
commit984cd77ddbf0eea7371a18ad7124120473b6bb2d (patch)
tree4747f5bc9053244ed9884d59d2bd983bf810c543 /t/t7400-submodule-basic.sh
parente98317508c02b7cc65bf5b28f27788e47096b166 (diff)
downloadgit-984cd77ddbf0eea7371a18ad7124120473b6bb2d.zip
git-984cd77ddbf0eea7371a18ad7124120473b6bb2d.tar.gz
git-984cd77ddbf0eea7371a18ad7124120473b6bb2d.tar.bz2
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>
Diffstat (limited to 't/t7400-submodule-basic.sh')
-rwxr-xr-xt/t7400-submodule-basic.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 2f53252..1a33040 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 &&