mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
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
This commit is contained in:
15
git-cl
15
git-cl
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user