Commit 0b9dca43 authored by David Aguilar's avatar David Aguilar Committed by Junio C Hamano

submodule sync: Update "submodule.<name>.url"

When "git submodule sync" synchronizes the repository URLs
it only updates submodules' .git/config.  However, the old
URLs still exist in the super-project's .git/config.

Update the super-project's configuration so that commands
such as "git submodule update" use the URLs from .gitmodules.
Signed-off-by: David Aguilar's avatarDavid Aguilar <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent 64fdc08d
......@@ -839,10 +839,11 @@ cmd_sync()
if test -e "$path"/.git
say "Synchronizing submodule url for '$name'"
git config submodule."$name".url "$url"
cd "$path"
say "Synchronizing submodule url for '$name'"
git config remote."$remote".url "$url"
......@@ -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)"
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment