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

Side by Side Diff: git-cl

Issue 5012006: Move git-cl into depot_tools.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 10 years 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 | git_cl/LICENSE » ('j') | 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) 2010 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 repo="$base_dir/git_cl_repo"
8 url="http://git.chromium.org/git/git-cl.git"
9 cur_url=$(git config -f "$repo/.git/config" remote.origin.url)
10 7
11 "$base_dir"/update_depot_tools 8 "$base_dir"/update_depot_tools
12 9 "$base_dir"/git_cl/git-cl "$@"
13 if [ -e "$repo" -a "$cur_url" != "$url" ]; then
14 # Always override "origin"
15 (cd "$repo"; git remote set-url origin $url)
16 fi
17
18 if [ ! -f "$repo/git-cl" ]; then
19 git clone $url $repo -q
20 elif [ ! -e "$repo/.git" ]; then
21 echo "$0: $repo does not appear to be a git repo"
22 elif [ "X$DEPOT_TOOLS_UPDATE" != "X0" ]; then
23 (cd "$repo"; git pull -q)
24 fi
25
26 $repo/git-cl "$@"
OLDNEW
« no previous file with comments | « no previous file | git_cl/LICENSE » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698