path: root/t/
diff options
authorJunio C Hamano <>2019-01-18 21:49:53 (GMT)
committerJunio C Hamano <>2019-01-18 21:49:53 (GMT)
commit3942920966b4392c52c09f66dda391d9c330f0f7 (patch)
treed1245dc0d86064a3450d1b08beb4207cf0f8458d /t/
parent1ed943e9ae5172088654f25b0a35c8425eee9b2f (diff)
parent8eda5efa1269a6117b86a97a309eb3a195b5f087 (diff)
Merge branch 'sb/submodule-unset-core-worktree-when-worktree-is-lost'
The core.worktree setting in a submodule repository should not be pointing at a directory when the submodule loses its working tree (e.g. getting deinit'ed), but the code did not properly maintain this invariant. * sb/submodule-unset-core-worktree-when-worktree-is-lost: submodule deinit: unset core.worktree submodule--helper: fix BUG message in ensure_core_worktree submodule: unset core.worktree if no working tree is present submodule update: add regression test with old style setups
Diffstat (limited to 't/')
1 files changed, 6 insertions, 1 deletions
diff --git a/t/ b/t/
index ce74c12..1cfa150 100755
--- a/t/
+++ b/t/
@@ -75,7 +75,12 @@ test_expect_success 're-setup nested submodule' '
GIT_WORK_TREE=../../../nested git -C sub1/.git/modules/nested config \
core.worktree "../../../nested" &&
# make sure this re-setup is correct
- git status --ignore-submodules=none
+ git status --ignore-submodules=none &&
+ # also make sure this old setup does not regress
+ git submodule update --init --recursive >out 2>err &&
+ test_must_be_empty out &&
+ test_must_be_empty err
test_expect_success 'absorb the git dir in a nested submodule' '