Skip to content

Commit

Permalink
Merge branch 'da/fix-submodule-sync-superproject-config'
Browse files Browse the repository at this point in the history
* da/fix-submodule-sync-superproject-config:
  submodule sync: Update "submodule.<name>.url"
  • Loading branch information
Junio C Hamano committed Aug 31, 2010
2 parents ae76cb9 + 0b9dca4 commit 2acf365
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion git-submodule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions t/t7403-submodule-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
)
'

Expand Down

0 comments on commit 2acf365

Please sign in to comment.