mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-01-02 16:14:25 +00:00
Merge "Fix UrlInsteadOf to handle multiple strings"
This commit is contained in:
commit
a6d258b84d
@ -216,7 +216,7 @@ class GitConfig(object):
|
|||||||
"""Resolve any url.*.insteadof references.
|
"""Resolve any url.*.insteadof references.
|
||||||
"""
|
"""
|
||||||
for new_url in self.GetSubSections('url'):
|
for new_url in self.GetSubSections('url'):
|
||||||
old_url = self.GetString('url.%s.insteadof' % new_url)
|
for old_url in self.GetString('url.%s.insteadof' % new_url, True):
|
||||||
if old_url is not None and url.startswith(old_url):
|
if old_url is not None and url.startswith(old_url):
|
||||||
return new_url + url[len(old_url):]
|
return new_url + url[len(old_url):]
|
||||||
return url
|
return url
|
||||||
|
Loading…
Reference in New Issue
Block a user