From ee3344214b603fdb3e5aad4e36b80a1f8526aa39 Mon Sep 17 00:00:00 2001 From: "szager@chromium.org" Date: Mon, 16 Dec 2013 19:43:26 +0000 Subject: [PATCH] Update submodule url unequivocally. It has happened (possibly due to a bug in deps2submodules.py) that people have wound up with an empty submodule..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 --- crup-runner.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crup-runner.sh b/crup-runner.sh index 56799dfce..eccb6136f 100755 --- a/crup-runner.sh +++ b/crup-runner.sh @@ -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" )