summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2020-02-24 14:40:25 -0500
committerMike Frysinger <vapier@google.com>2020-02-24 21:17:08 +0000
commitd957ec6a834e333a3812546911f786b0c20b808f (patch)
treeb1451a20fd82b68e2204cd8054d018d2c7db138a
parent9f91c4395acf03b89738225b329c19fecaf46a3e (diff)
downloadgit-repo-d957ec6a834e333a3812546911f786b0c20b808f.tar.gz
manifest_xml: skip config lookup during first initv2.4.1
Trying to use the config state when the git tree hasn't yet been created hits bad side effects. Add a check to avoid probing the config logic during the first run. It's not clear what's going wrong at the lower layers, but this gets us back to the behavior before we added worktree support, so lets settle the status quo. Bug: https://crbug.com/gerrit/12387 Change-Id: I85b56797455f3c2e249d02c18496e060be05501d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/256592 Reviewed-by: Xin Li <delphij@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Mike Frysinger <vapier@google.com>
-rw-r--r--manifest_xml.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index a3effd11..fe09f498 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -155,7 +155,7 @@ class XmlManifest(object):
155 # normal repo settings live in the manifestProject which we just setup 155 # normal repo settings live in the manifestProject which we just setup
156 # above, so we couldn't easily query before that. We assume Project() 156 # above, so we couldn't easily query before that. We assume Project()
157 # init doesn't care if this changes afterwards. 157 # init doesn't care if this changes afterwards.
158 if mp.config.GetBoolean('repo.worktree'): 158 if os.path.exists(mp.gitdir) and mp.config.GetBoolean('repo.worktree'):
159 mp.use_git_worktrees = True 159 mp.use_git_worktrees = True
160 160
161 self._Unload() 161 self._Unload()