mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-06 02:30:30 -08:00
extensions clone depth 1
This commit is contained in:
parent
39ec4f06ff
commit
bf5e5f4269
1 changed files with 2 additions and 2 deletions
|
|
@ -345,12 +345,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) as repo:
|
||||
with git.Repo.clone_from(url, tmpdir, depth=1) as repo:
|
||||
repo.remote().fetch()
|
||||
for submodule in repo.submodules:
|
||||
submodule.update()
|
||||
else:
|
||||
with git.Repo.clone_from(url, tmpdir, branch=branch_name) as repo:
|
||||
with git.Repo.clone_from(url, tmpdir, depth=1, branch=branch_name) as repo:
|
||||
repo.remote().fetch()
|
||||
for submodule in repo.submodules:
|
||||
submodule.update()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue