提交 412a79f4 编写于 作者: J Junio C Hamano

Merge branch 'jl/submodule-re-add'

* jl/submodule-re-add:
  submodule add: fix breakage when re-adding a deep submodule
......@@ -131,6 +131,7 @@ module_clone()
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)
......
......@@ -611,4 +611,12 @@ test_expect_success 'submodule update places git-dir in superprojects git-dir re
)
'
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册