Merge branch 'da/fix-submodule-sync-superproject-config'

* da/fix-submodule-sync-superproject-config:
  submodule sync: Update "submodule.<name>.url"
This commit is contained in:
Junio C Hamano 2010-08-31 16:25:29 -07:00
commit 2acf3658a3
2 changed files with 5 additions and 1 deletions

View file

@ -839,10 +839,11 @@ cmd_sync()
if test -e "$path"/.git
then
(
say "Synchronizing submodule url for '$name'"
git config submodule."$name".url "$url"
clear_local_git_env
cd "$path"
remote=$(get_default_remote)
say "Synchronizing submodule url for '$name'"
git config remote."$remote".url "$url"
)
fi

View file

@ -58,6 +58,9 @@ test_expect_success '"git submodule sync" should update submodule URLs' '
(cd super-clone/submodule &&
git checkout master &&
git pull
) &&
(cd super-clone &&
test -d "$(git config submodule.submodule.url)"
)
'