Merge branch 'da/fix-submodule-sync-superproject-config'
authorJunio C Hamano <gitster@pobox.com>
Tue, 31 Aug 2010 23:25:29 +0000 (16:25 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 31 Aug 2010 23:25:29 +0000 (16:25 -0700)
* da/fix-submodule-sync-superproject-config:
submodule sync: Update "submodule.<name>.url"

git-submodule.sh
t/t7403-submodule-sync.sh
index 170186f4946859e04d6a0b4ce248dd17bc877b31..9ebbab798d21147fc019b6183cad0c462c9dafca 100755 (executable)
@@ -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
index bade2179b1f7f6be44ba3266eae147634b60987f..02522f9627eea8166b2d4709ef3519b23c8dd3d5 100755 (executable)
@@ -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)"
        )
 '