summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--project.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/project.py b/project.py
index d83dd2d7..b3b5d5cb 100644
--- a/project.py
+++ b/project.py
@@ -3034,6 +3034,9 @@ class Project(object):
3034 setting = fp.read() 3034 setting = fp.read()
3035 assert setting.startswith('gitdir:') 3035 assert setting.startswith('gitdir:')
3036 git_worktree_path = setting.split(':', 1)[1].strip() 3036 git_worktree_path = setting.split(':', 1)[1].strip()
3037 # Some platforms (e.g. Windows) won't let us update dotgit in situ because
3038 # of file permissions. Delete it and recreate it from scratch to avoid.
3039 platform_utils.remove(dotgit)
3037 # Use relative path from checkout->worktree. 3040 # Use relative path from checkout->worktree.
3038 with open(dotgit, 'w') as fp: 3041 with open(dotgit, 'w') as fp:
3039 print('gitdir:', os.path.relpath(git_worktree_path, self.worktree), 3042 print('gitdir:', os.path.relpath(git_worktree_path, self.worktree),