Content-Length: 283572 | pFad | http://github.com/gitpython-developers/GitPython/commit/ec2e2c8b894512e7a2364774d77cdd9db73f0566

0A Allow relative path url in submodules for submodule_update · gitpython-developers/GitPython@ec2e2c8 · GitHub
Skip to content

Commit ec2e2c8

Browse files
committed
Allow relative path url in submodules for submodule_update
1 parent 4d529b7 commit ec2e2c8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

git/objects/submodule/base.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import stat
1212
import sys
1313
import uuid
14+
import urllib
1415

1516
import git
1617
from git.cmd import Git
@@ -799,9 +800,13 @@ def update(
799800
+ "Cloning url '%s' to '%s' in submodule %r" % (self.url, checkout_module_abspath, self.name),
800801
)
801802
if not dry_run:
803+
if self.url.startswith("."):
804+
url = urllib.parse.urljoin(self.repo.remotes.origen.url + "/", self.url)
805+
else:
806+
url = self.url
802807
mrepo = self._clone_repo(
803808
self.repo,
804-
self.url,
809+
url,
805810
self.path,
806811
self.name,
807812
n=True,

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/gitpython-developers/GitPython/commit/ec2e2c8b894512e7a2364774d77cdd9db73f0566

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy