From 02c0ee6ae61f4733970203c8241eaad4ba4c6ae5 Mon Sep 17 00:00:00 2001 From: Shouheng Zhang Date: Fri, 8 Dec 2017 09:54:58 +0800 Subject: 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 Change-Id: I2a24c291ea0074ba13a740b32a11c0c25975e72b --- project.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'project.py') diff --git a/project.py b/project.py index 83dcf551..2248a7ef 100644 --- a/project.py +++ b/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, -- cgit v1.2.3-54-g00ecf