Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitec2e2c8

Browse files
committed
Allow relative path url in submodules for submodule_update
1 parent4d529b7 commitec2e2c8

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
importstat
1212
importsys
1313
importuuid
14+
importurllib
1415

1516
importgit
1617
fromgit.cmdimportGit
@@ -799,9 +800,13 @@ def update(
799800
+"Cloning url '%s' to '%s' in submodule %r"% (self.url,checkout_module_abspath,self.name),
800801
)
801802
ifnotdry_run:
803+
ifself.url.startswith("."):
804+
url=urllib.parse.urljoin(self.repo.remotes.origin.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)

[8]ページ先頭

©2009-2025 Movatter.jp