Commits

Anonymous committed 5febbda Merge

Merge branch 'jl/submodule-re-add' into maint

* jl/submodule-re-add:
submodule add: fix breakage when re-adding a deep submodule

Comments (0)

Files changed (2)

 	gitdir=
 	gitdir_base=
 	name=$(module_name "$path" 2>/dev/null)
+	test -n "$name" || name="$path"
 	base_path=$(dirname "$path")
 
 	gitdir=$(git rev-parse --git-dir)

t/t7406-submodule-update.sh

 	)
 '
 
+test_expect_success 'submodule add properly re-creates deeper level submodules' '
+	(cd super &&
+	 git reset --hard master &&
+	 rm -rf deeper/ &&
+	 git submodule add ../submodule deeper/submodule
+	)
+'
+
 test_done