From bf5e5f4269a263cce0abb993419302edb5b5b8d0 Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Sat, 20 May 2023 15:08:08 +0900 Subject: [PATCH 1/2] extensions clone depth 1 --- modules/ui_extensions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index ef18f438..88a7381b 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -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() From cd03317c05b5e31d2d7b77d7ddd0e01f45c6064d Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Sun, 21 May 2023 16:42:54 +0900 Subject: [PATCH 2/2] --filter=blob:none Co-Authored-By: Aarni Koskela Co-Authored-By: catboxanon <122327233+catboxanon@users.noreply.github.com> --- modules/ui_extensions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index 88a7381b..515ec262 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -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, depth=1) 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, depth=1, branch=branch_name) 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()