mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-04 11:12:35 +00:00
Revert Pull Request #11244
Revert "Add github mirror for the download extension" This reverts commit9ec2ba2d28
. Revert "Update code style" This reverts commitde022c4c80
. Revert "Update call method" This reverts commite9bd18c57b
. Revert "move github proxy to settings, System page." This reverts commit4981c7d370
.
This commit is contained in:
@@ -325,17 +325,6 @@ def normalize_git_url(url):
|
||||
return url
|
||||
|
||||
|
||||
def github_proxy(url):
|
||||
proxy = shared.opts.github_proxy
|
||||
|
||||
if proxy == 'None':
|
||||
return url
|
||||
if proxy == 'ghproxy.com':
|
||||
return "https://ghproxy.com/" + url
|
||||
|
||||
return url.replace('github.com', proxy)
|
||||
|
||||
|
||||
def install_extension_from_url(dirname, url, branch_name=None):
|
||||
check_access()
|
||||
|
||||
@@ -346,8 +335,6 @@ def install_extension_from_url(dirname, url, branch_name=None):
|
||||
|
||||
assert url, 'No URL specified'
|
||||
|
||||
url = github_proxy(url)
|
||||
|
||||
if dirname is None or dirname == "":
|
||||
*parts, last_part = url.split('/')
|
||||
last_part = normalize_git_url(last_part)
|
||||
@@ -367,12 +354,12 @@ def install_extension_from_url(dirname, url, branch_name=None):
|
||||
shutil.rmtree(tmpdir, True)
|
||||
if not branch_name:
|
||||
# if no branch is specified, use the default branch
|
||||
with git.Repo.clone_from(url, tmpdir, filter=['blob:none'], verbose=False) as repo:
|
||||
with git.Repo.clone_from(url, tmpdir, filter=['blob:none']) as repo:
|
||||
repo.remote().fetch()
|
||||
for submodule in repo.submodules:
|
||||
submodule.update()
|
||||
else:
|
||||
with git.Repo.clone_from(url, tmpdir, filter=['blob:none'], branch=branch_name, verbose=False) as repo:
|
||||
with git.Repo.clone_from(url, tmpdir, filter=['blob:none'], branch=branch_name) as repo:
|
||||
repo.remote().fetch()
|
||||
for submodule in repo.submodules:
|
||||
submodule.update()
|
||||
|
Reference in New Issue
Block a user