From 12649efc71d8e6d86e90af34fc8411b6b614fe0a Mon Sep 17 00:00:00 2001 From: "nsylvain@google.com" Date: Wed, 1 Jun 2011 17:11:20 +0000 Subject: [PATCH] Modify "gclient config url" to act a little bit more like "git clone url". If the url is pointing to a git repo, the name of the directory created on disk will not contain the .git suffix. Review URL: http://codereview.chromium.org/7104009 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@87492 0039d316-1c4b-4281-b951-d872f2087c98 --- gclient.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gclient.py b/gclient.py index 1b77aae13..b36f5816d 100644 --- a/gclient.py +++ b/gclient.py @@ -990,6 +990,8 @@ URL. base_url = args[0].rstrip('/') if not options.name: name = base_url.split('/')[-1] + if name.endswith('.git'): + name = name[:-4] else: # specify an alternate relpath for the given URL. name = options.name