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

Unified Diff: git-cl

Issue 609002: Make git-cl wrapper print errors instead of silently deleting repos.... (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: Created 10 years, 10 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
===================================================================
--- git-cl (revision 39096)
+++ git-cl (working copy)
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -8,7 +8,19 @@
cur_url=$(git config -f "$base_dir/git-cl-repo/.git/config" remote.origin.url)
if [ "$cur_url" != "$url" ]; then
+ cat <<EOF
+$base_dir/git-cl-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 $base_dir/git-cl-repo
+EOF
+ exit 1
fi
if [ ! -f "$base_dir/git-cl-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