aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-submodule.sh3
-rwxr-xr-xt/t7403-submodule-sync.sh3
2 files changed, 5 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
diff --git a/t/t7403-submodule-sync.sh b/t/t7403-submodule-sync.sh
index 753875648..3033c4a22 100755
--- a/t/t7403-submodule-sync.sh
+++ b/t/t7403-submodule-sync.sh
@@ -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)"
)
'