diff --git a/gclient_scm.py b/gclient_scm.py index ab07b830d..e0a90912e 100644 --- a/gclient_scm.py +++ b/gclient_scm.py @@ -353,7 +353,10 @@ class GitWrapper(SCMWrapper): not os.path.exists(os.path.join(self.checkout_path, '.git')))): if (os.path.isdir(self.checkout_path) and not os.path.exists(os.path.join(self.checkout_path, '.git'))): - self._DeleteOrMove(options.force) + # This is a little hack to work around checkouts which are created + # using "gclient config --name ." + if not self.relpath == '.': + self._DeleteOrMove(options.force) self._Clone(revision, url, options) self._UpdateBranchHeads(options, fetch=True) if file_list is not None: