提交 e9179183 编写于 作者: J Junio C Hamano

Merge branch 'da/fix-submodule-sync-superproject-config' into maint

* da/fix-submodule-sync-superproject-config:
  submodule sync: Update "submodule.<name>.url"
...@@ -839,10 +839,11 @@ cmd_sync() ...@@ -839,10 +839,11 @@ cmd_sync()
if test -e "$path"/.git if test -e "$path"/.git
then then
( (
say "Synchronizing submodule url for '$name'"
git config submodule."$name".url "$url"
clear_local_git_env clear_local_git_env
cd "$path" cd "$path"
remote=$(get_default_remote) remote=$(get_default_remote)
say "Synchronizing submodule url for '$name'"
git config remote."$remote".url "$url" git config remote."$remote".url "$url"
) )
fi fi
......
...@@ -58,6 +58,9 @@ test_expect_success '"git submodule sync" should update submodule URLs' ' ...@@ -58,6 +58,9 @@ test_expect_success '"git submodule sync" should update submodule URLs' '
(cd super-clone/submodule && (cd super-clone/submodule &&
git checkout master && git checkout master &&
git pull git pull
) &&
(cd super-clone &&
test -d "$(git config submodule.submodule.url)"
) )
' '
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册