mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-16 01:57:04 +08:00
Fix: use tag_ref.name explicitly and cache get_remote_name result
Some checks failed
Python Linting / Run Ruff (push) Has been cancelled
Some checks failed
Python Linting / Run Ruff (push) Has been cancelled
- Use tag_ref.name instead of tag_ref object for checkout - Cache get_remote_name() result to avoid duplicate calls 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
22a5992b11
commit
5941ee9ae5
@ -2538,7 +2538,7 @@ def update_to_stable_comfyui(repo_path):
|
|||||||
return "skip", None
|
return "skip", None
|
||||||
else:
|
else:
|
||||||
logging.info(f"[ComfyUI-Manager] Updating ComfyUI: {current_tag} -> {latest_tag}")
|
logging.info(f"[ComfyUI-Manager] Updating ComfyUI: {current_tag} -> {latest_tag}")
|
||||||
repo.git.checkout(tag_ref)
|
repo.git.checkout(tag_ref.name)
|
||||||
execute_install_script("ComfyUI", repo_path, instant_execution=False, no_deps=False)
|
execute_install_script("ComfyUI", repo_path, instant_execution=False, no_deps=False)
|
||||||
return 'updated', latest_tag
|
return 'updated', latest_tag
|
||||||
except:
|
except:
|
||||||
@ -3364,9 +3364,10 @@ async def restore_snapshot(snapshot_path, git_helper_extras=None):
|
|||||||
def get_comfyui_versions(repo=None):
|
def get_comfyui_versions(repo=None):
|
||||||
repo = repo or git.Repo(comfy_path)
|
repo = repo or git.Repo(comfy_path)
|
||||||
|
|
||||||
|
remote_name = None
|
||||||
try:
|
try:
|
||||||
remote = get_remote_name(repo)
|
remote_name = get_remote_name(repo)
|
||||||
repo.remotes[remote].fetch()
|
repo.remotes[remote_name].fetch()
|
||||||
except:
|
except:
|
||||||
logging.error("[ComfyUI-Manager] Failed to fetch ComfyUI")
|
logging.error("[ComfyUI-Manager] Failed to fetch ComfyUI")
|
||||||
|
|
||||||
@ -3402,7 +3403,6 @@ def get_comfyui_versions(repo=None):
|
|||||||
exact_tag = ''
|
exact_tag = ''
|
||||||
|
|
||||||
head_is_default = False
|
head_is_default = False
|
||||||
remote_name = get_remote_name(repo)
|
|
||||||
if remote_name:
|
if remote_name:
|
||||||
try:
|
try:
|
||||||
default_head_ref = repo.refs[f'{remote_name}/HEAD']
|
default_head_ref = repo.refs[f'{remote_name}/HEAD']
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user