summaryrefslogtreecommitdiffstats
path: root/subcmds
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds')
-rw-r--r--subcmds/sync.py21
1 files changed, 1 insertions, 20 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 7416f4c3..d4637d0c 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -563,31 +563,12 @@ uncommitted changes are present' % project.relpath
563 to_fetch.extend(all_projects) 563 to_fetch.extend(all_projects)
564 to_fetch.sort(key=self._fetch_times.Get, reverse=True) 564 to_fetch.sort(key=self._fetch_times.Get, reverse=True)
565 565
566 fetched = self._Fetch(to_fetch, opt) 566 self._Fetch(to_fetch, opt)
567 _PostRepoFetch(rp, opt.no_repo_verify) 567 _PostRepoFetch(rp, opt.no_repo_verify)
568 if opt.network_only: 568 if opt.network_only:
569 # bail out now; the rest touches the working tree 569 # bail out now; the rest touches the working tree
570 return 570 return
571 571
572 # Iteratively fetch missing and/or nested unregistered submodules
573 previously_missing_set = set()
574 while True:
575 self.manifest._Unload()
576 all_projects = self.GetProjects(args, missing_ok=True)
577 missing = []
578 for project in all_projects:
579 if project.gitdir not in fetched:
580 missing.append(project)
581 if not missing:
582 break
583 # Stop us from non-stopped fetching actually-missing repos: If set of
584 # missing repos has not been changed from last fetch, we break.
585 missing_set = set(p.name for p in missing)
586 if previously_missing_set == missing_set:
587 break
588 previously_missing_set = missing_set
589 fetched.update(self._Fetch(missing, opt))
590
591 if self.manifest.IsMirror: 572 if self.manifest.IsMirror:
592 # bail out now, we have no working tree 573 # bail out now, we have no working tree
593 return 574 return