path: root/t/
diff options
authorStefan Beller <>2018-03-28 22:35:31 (GMT)
committerJunio C Hamano <>2018-03-29 16:44:51 (GMT)
commitda62f786d2df60f3c8255cf4cbbcd9c1f9458d99 (patch)
tree9a0a2c11baadcabfbdd1c4044e7252a3b8862af4 /t/
parent0c89fdd739183234f86fe2be03a0374705ed93ed (diff)
submodule: fixup nested submodules after moving the submodule
connect_work_tree_and_git_dir is used to connect a submodule worktree with its git directory and vice versa after events that require a reconnection such as moving around the working tree. As submodules can have nested submodules themselves, we'd also want to fix the nested submodules when asked to. Add an option to recurse into the nested submodules and connect them as well. As submodules are identified by their name (which determines their git directory in relation to their superproject's git directory) internally and by their path in the working tree of the superproject, we need to make sure that the mapping of name <-> path is kept intact. We can do that in the git-mv command by writing out the gitmodules file first and then forcing a reload of the submodule config machinery. Signed-off-by: Stefan Beller <> Reviewed-by: Jonathan Tan <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't/')
1 files changed, 1 insertions, 1 deletions
diff --git a/t/ b/t/
index 6e5031f..bfe2c42 100755
--- a/t/
+++ b/t/
@@ -491,7 +491,7 @@ test_expect_success 'moving a submodule in nested directories' '
test_cmp expect actual
-test_expect_failure 'moving nested submodules' '
+test_expect_success 'moving nested submodules' '
git commit -am "cleanup commit" &&
mkdir sub_nested_nested &&
(cd sub_nested_nested &&