1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-30 13:57:54 +01:00

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

* jl/submodule-re-add:
  submodule add: fix breakage when re-adding a deep submodule
This commit is contained in:
Junio C Hamano 2012-02-10 13:59:01 -08:00
commit 5febbda4e7
2 changed files with 9 additions and 0 deletions

View file

@ -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)

View file

@ -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