| Index: gclient_scm.py
|
| diff --git a/gclient_scm.py b/gclient_scm.py
|
| index e0140515fa0ea47da8b0a53f51c7fd76932052ef..12450a70285e773c3b57f54d6f025cd4af3604d1 100644
|
| --- a/gclient_scm.py
|
| +++ b/gclient_scm.py
|
| @@ -352,14 +352,11 @@ class GitWrapper(SCMWrapper):
|
| if (not os.path.exists(self.checkout_path) or
|
| (os.path.isdir(self.checkout_path) and
|
| 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')) and
|
| - os.listdir(self.checkout_path)):
|
| - # 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)
|
| + try:
|
| + self._Clone(revision, url, options)
|
| + except subprocess2.CalledProcessError:
|
| + self._DeleteOrMove(options.force)
|
| + self._Clone(revision, url, options)
|
| self._UpdateBranchHeads(options, fetch=True)
|
| if file_list is not None:
|
| files = self._Capture(['ls-files']).splitlines()
|
|
|