aboutsummaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorDavid Aguilar <davvid@gmail.com>2010-08-18 08:58:33 -0700
committerJunio C Hamano <gitster@pobox.com>2010-08-18 13:54:30 -0700
commit0b9dca434f5d9208a26f47f7ec11453f1cfdfae8 (patch)
treee6e5cb8698b55956f6a99e9b8ba8902ed697b599 /git-submodule.sh
parent64fdc08dac6694d1e754580e7acb82dfa4988bb9 (diff)
downloadgit-0b9dca434f5d9208a26f47f7ec11453f1cfdfae8.tar.gz
git-0b9dca434f5d9208a26f47f7ec11453f1cfdfae8.tar.xz
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>
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 170186f49..9ebbab798 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -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