mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-06-21 15:29:26 +08:00
Adding depth 1 to all git installsg
This commit is contained in:
parent
fc943172eb
commit
49085ea07b
@ -71,7 +71,7 @@ def gitclone(custom_nodes_path, url, target_hash=None, repo_path=None):
|
||||
repo_path = os.path.join(custom_nodes_path, repo_name)
|
||||
|
||||
# Clone the repository from the remote URL
|
||||
repo = git.Repo.clone_from(url, repo_path, recursive=True, progress=GitProgress())
|
||||
repo = git.Repo.clone_from(url, repo_path, recursive=True, progress=GitProgress(), depth=1)
|
||||
|
||||
if target_hash is not None:
|
||||
print(f"CHECKOUT: {repo_name} [{target_hash}]")
|
||||
|
||||
@ -1294,7 +1294,7 @@ class UnifiedManager:
|
||||
if res != 0:
|
||||
return result.fail(f"Failed to clone repo: {clone_url}")
|
||||
else:
|
||||
repo = git.Repo.clone_from(clone_url, repo_path, recursive=True, progress=GitProgress())
|
||||
repo = git.Repo.clone_from(clone_url, repo_path, recursive=True, progress=GitProgress(), depth=1)
|
||||
repo.git.clear_cache()
|
||||
repo.close()
|
||||
|
||||
@ -2133,7 +2133,7 @@ async def gitclone_install(url, instant_execution=False, msg_prefix='', no_deps=
|
||||
if res != 0:
|
||||
return result.fail(f"Failed to clone '{clone_url}' into '{repo_path}'")
|
||||
else:
|
||||
repo = git.Repo.clone_from(clone_url, repo_path, recursive=True, progress=GitProgress())
|
||||
repo = git.Repo.clone_from(clone_url, repo_path, recursive=True, progress=GitProgress(), depth=1)
|
||||
if commit_id!= "":
|
||||
repo.git.checkout(commit_id)
|
||||
repo.git.submodule('update', '--init', '--recursive')
|
||||
|
||||
@ -262,7 +262,7 @@ def clone_or_pull_git_repository(git_url):
|
||||
print(f"Pulling {repo_name} failed: {e}")
|
||||
else:
|
||||
try:
|
||||
Repo.clone_from(git_url, repo_dir, recursive=True)
|
||||
Repo.clone_from(git_url, repo_dir, recursive=True, depth=1)
|
||||
print(f"Cloning {repo_name}...")
|
||||
except Exception as e:
|
||||
print(f"Cloning {repo_name} failed: {e}")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user