mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-02-13 06:32:34 +08:00
Fixed cloning depth & branch selection
This commit is contained in:
parent
65e17a3c3f
commit
76811f35fc
@ -563,11 +563,11 @@ def gitclone_install(files, instant_execution=False, msg_prefix=''):
|
|||||||
|
|
||||||
# Clone the repository from the remote URL
|
# Clone the repository from the remote URL
|
||||||
if not instant_execution and platform.system() == 'Windows':
|
if not instant_execution and platform.system() == 'Windows':
|
||||||
res = manager_funcs.run_script([sys.executable, git_script_path, "--clone", custom_nodes_path, url], cwd=custom_nodes_path)
|
res = manager_funcs.run_script([sys.executable, git_script_path, "--clone --depth=1 --single-branch --recurse-submodules", custom_nodes_path, url], cwd=custom_nodes_path)
|
||||||
if res != 0:
|
if res != 0:
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
repo = git.Repo.clone_from(url, repo_path, recursive=True, progress=GitProgress())
|
repo = git.Repo.clone_from(url, repo_path, multi_options = ["--depth=1", "--single-branch", "--recurse-submodules"], progress=GitProgress())
|
||||||
repo.git.clear_cache()
|
repo.git.clear_cache()
|
||||||
repo.close()
|
repo.close()
|
||||||
|
|
||||||
|
|||||||
@ -259,7 +259,7 @@ def clone_or_pull_git_repository(git_url):
|
|||||||
print(f"Pulling {repo_name} failed: {e}")
|
print(f"Pulling {repo_name} failed: {e}")
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
Repo.clone_from(git_url, repo_dir, multi_options = ["--depth=1", "--single-branch" "--recurse-submodules"])
|
Repo.clone_from(git_url, repo_dir, multi_options = ["--depth=1", "--single-branch", "--recurse-submodules"])
|
||||||
print(f"Cloning {repo_name}...")
|
print(f"Cloning {repo_name}...")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Cloning {repo_name} failed: {e}")
|
print(f"Cloning {repo_name} failed: {e}")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user