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 <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
64fdc08dac
commit
0b9dca434f
@ -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
|
||||
|
||||
Reference in New Issue
Block a user