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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 base_dir=$(dirname "$0") 6 base_dir=$(dirname "$0")
7 url="http://src.chromium.org/git/git-cl.git" 7 url="http://src.chromium.org/git/git-cl.git"
8 cur_url=$(git config -f "$base_dir/git-cl-repo/.git/config" remote.origin.url) 8 cur_url=$(git config -f "$base_dir/git-cl-repo/.git/config" remote.origin.url)
9 9
10 if [ "$cur_url" != "$url" ]; then 10 if [ "$cur_url" != "$url" ]; then
11 cat <<EOF
12 $base_dir/git-cl-repo
13 is tracking a non-default remote repository:
14
15 default: $url
16 yours: $cur_url
17
18 This is intended to be an automatically-updating, read-only repository.
19 Please create a separate repository for making changes to git-cl, move your
20 modifications there, and then run:
11 rm -rf $base_dir/git-cl-repo 21 rm -rf $base_dir/git-cl-repo
22 EOF
23 exit 1
12 fi 24 fi
13 25
14 if [ ! -f "$base_dir/git-cl-repo/git-cl" ]; then 26 if [ ! -f "$base_dir/git-cl-repo/git-cl" ]; then
15 git clone $url $base_dir/git-cl-repo -q 27 git clone $url $base_dir/git-cl-repo -q
16 fi 28 fi
17 29
18 $base_dir/git-cl-repo/git-cl "$@" 30 $base_dir/git-cl-repo/git-cl "$@"
OLDNEW
« 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