Skip to content

Commit

Permalink
fixed: snapshot - robust resolving the remote url
Browse files Browse the repository at this point in the history
  • Loading branch information
ltdrdata committed Jan 12, 2025
1 parent c779573 commit f37f5b0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
17 changes: 15 additions & 2 deletions glob/manager_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from node_package import InstalledNodePackage


version_code = [3, 7, 1]
version_code = [3, 7, 2]
version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')


Expand Down Expand Up @@ -2463,8 +2463,21 @@ async def get_current_snapshot():
cnr_custom_nodes[info['id']] = info['ver']
else:
repo = git.Repo(fullpath)

if repo.head.is_detached:
remote_name = get_remote_name(repo)
else:
current_branch = repo.active_branch

if current_branch.tracking_branch() is None:
remote_name = get_remote_name(repo)
else:
remote_name = current_branch.tracking_branch().remote_name

commit_hash = repo.head.commit.hexsha
url = repo.remotes.origin.url

url = repo.remotes[remote_name].url

git_custom_nodes[url] = dict(hash=commit_hash, disabled=is_disabled)
except:
print(f"Failed to extract snapshots for the custom node '{path}'.")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "comfyui-manager"
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
version = "3.7.1"
version = "3.7.2"
license = { file = "LICENSE.txt" }
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]

Expand Down

0 comments on commit f37f5b0

Please sign in to comment.