summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 64fdc08)
raw | patch | inline | side by side (parent: 64fdc08)
author | David Aguilar <davvid@gmail.com> | |
Wed, 18 Aug 2010 15:58:33 +0000 (08:58 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 18 Aug 2010 20:54:30 +0000 (13:54 -0700) |
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>
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>
git-submodule.sh | patch | blob | history | |
t/t7403-submodule-sync.sh | patch | blob | history |
diff --git a/git-submodule.sh b/git-submodule.sh
index 170186f4946859e04d6a0b4ce248dd17bc877b31..9ebbab798d21147fc019b6183cad0c462c9dafca 100755 (executable)
--- a/git-submodule.sh
+++ b/git-submodule.sh
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 7538756487d9b9483143b338104cd6af13397a91..3033c4a22d0be9b2f24154bbd41d20a3f8419ba5 100755 (executable)
(cd super-clone/submodule &&
git checkout master &&
git pull
+ ) &&
+ (cd super-clone &&
+ test -d "$(git config submodule.submodule.url)"
)
'