gclient: Unset core.worktree after cloning on Windows.

Caused by https://github.com/git-for-windows/git/issues/2569

Bug: 1070694
Change-Id: Ice39e0f61e5c571562736a35e6441d01cb76ea06
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2300652
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
changes/52/2300652/4
Edward Lesmes 5 years ago committed by LUCI CQ
parent 4531a0531a
commit d4e20f24d5

@ -1043,6 +1043,14 @@ class GitWrapper(SCMWrapper):
gclient_utils.safe_makedirs(self.checkout_path)
gclient_utils.safe_rename(os.path.join(tmp_dir, '.git'),
os.path.join(self.checkout_path, '.git'))
# TODO(https://github.com/git-for-windows/git/issues/2569): Remove once
# fixed.
if sys.platform.startswith('win'):
try:
self._Run(['config', '--unset', 'core.worktree'], options,
cwd=self.checkout_path)
except subprocess2.CalledProcessError:
pass
except:
traceback.print_exc(file=self.out_fh)
raise

Loading…
Cancel
Save