Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: git-cl

Issue 3796010: Change git-cl wrapper script to automatically fix the git_cl_repo remote url. (Closed)
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git-cl
diff --git a/git-cl b/git-cl
index 2c77654f3c703848e06ff0eb55d225f757294710..48cc4cdf2ddb8f035efbf01d82a5286616e4b317 100755
--- a/git-cl
+++ b/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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698