Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion git/objects/submodule/root.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
)
from git.exc import InvalidGitRepositoryError
import git
import os

import logging

Expand Down Expand Up @@ -197,7 +198,13 @@ def update(self, previous_commit=None, recursive=True, force_remove=False, init=

if not dry_run:
assert nn not in [r.name for r in rmts]
smr = smm.create_remote(nn, sm.url)

# Handle relative urls
remoteUrl = sm.url
if sm.url.startswith('..'):
remoteUrl = os.path.join(repo.remotes.origin.url, sm.url)
# END handle relative url check
smr = smm.create_remote(nn, remoteUrl)
smr.fetch(progress=progress)

# If we have a tracking branch, it should be available
Expand Down