Ver Fonte

Sync correctly when subproject url is a relative url to its parent url

Issue: when subproject url is a relative in .gitmodules
repo tool cannot handle this and cause:
"fatal: '***' does not appear to be a git repository
 fatal: Could not read from remote repository."
issue.

Signed-off-by: Shouheng Zhang <shouheng.zhang@intel.com>
Change-Id: I2a24c291ea0074ba13a740b32a11c0c25975e72b
Shouheng Zhang há 8 anos atrás
pai
commit
02c0ee6ae6
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      project.py

+ 2 - 0
project.py

@@ -1880,6 +1880,8 @@ class Project(object):
         result.extend(project.GetDerivedSubprojects())
         continue
 
+      if url.startswith('..'):
+        url = urllib.parse.urljoin("%s/" % self.remote.url, url)
       remote = RemoteSpec(self.remote.name,
                           url=url,
                           pushUrl=self.remote.pushUrl,