Change git-cl wrapper script to automatically fix the git_cl_repo remote url.

This is nicer than an error message.

TEST=manually tested the url was overwritten
BUG=none

Review URL: http://codereview.chromium.org/3796010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@62923 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
maruel@chromium.org 15 years ago
parent 45e9f2d2f8
commit 37801da395

@ -9,19 +9,8 @@ url="http://git.chromium.org/git/git-cl.git"
cur_url=$(git config -f "$repo/.git/config" remote.origin.url)
if [ -e "$repo" -a "$cur_url" != "$url" ]; then
cat <<EOF
$repo
is tracking a non-default remote repository:
default: $url
yours: $cur_url
This is intended to be an automatically-updating, read-only repository.
Please create a separate repository for making changes to git-cl, move your
modifications there, and then run:
rm -rf $repo
EOF
exit 1
# Always override "origin"
(cd "$repo"; git remote set-url origin $url)
fi
if [ ! -f "$repo/git-cl" ]; then

Loading…
Cancel
Save