Commit ee334421 authored by szager@chromium.org's avatar szager@chromium.org

Update submodule url unequivocally.

It has happened (possibly due to a bug in deps2submodules.py) that
people have wound up with an empty submodule.<name>.url entry in
their git config.  If that happens, crup-runner.sh should update it.

TBR=adamk@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/116583003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@240973 0039d316-1c4b-4281-b951-d872f2087c98
parent ed2b4fe5
......@@ -40,7 +40,7 @@ update_submodule_url () {
# this way because `git submodule sync` is absurdly slow.
new_url=$(git config -f .gitmodules "submodule.$1.url" 2>/dev/null)
old_url=$(git config "submodule.$1.url" 2>/dev/null)
if [ -n "$old_url" -a "$new_url" != "$old_url" ]; then
if [ "$new_url" != "$old_url" ]; then
git config "submodule.$1.url" "$new_url"
if [ -e "$1"/.git ]; then
( cd $submod && git config remote.origin.url "$new_url" )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment