mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-11-05 07:47:25 +00:00
[PR #2719] [MERGED] feat: add pygit2 compatibility wrapper for standalone Desktop 2.0 installs #2721
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/ComfyUI-Manager#2721
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/ComfyUI-Manager/pull/2719
Author: @Kosinkadink
Created: 3/21/2026
Status: ✅ Merged
Merged: 3/26/2026
Merged by: @ltdrdata
Base:
manager-v4← Head:fix/pygit2-fallback-v4📝 Commits (3)
8831f1ffeat: add pygit2 compatibility wrapper for standalone Desktop 2.0 installs73f4dd5fix(pygit2): address review findings + bump version to 4.2b1c820627style: fix ruff F841 unused variable and F541 unnecessary f-string📊 Changes
11 files changed (+2061 additions, -400 deletions)
View changed files
📝
cm_cli/__main__.py(+4 -4)📝
comfyui_manager/common/context.py(+3 -3)➕
comfyui_manager/common/git_compat.py(+844 -0)📝
comfyui_manager/common/git_helper.py(+103 -103)📝
comfyui_manager/common/timestamp_utils.py(+1 -1)📝
comfyui_manager/glob/manager_core.py(+263 -276)📝
comfyui_manager/glob/utils/environment_utils.py(+10 -10)📝
comfyui_manager/legacy/manager_core.py(+1 -1)📝
pyproject.toml(+2 -2)📝
requirements.txt(+1 -0)➕
tests/test_git_compat.py(+829 -0)📄 Description
Eliminates the hidden system git requirement for Desktop 2.0 standalone installs by wrapping all git operations behind a
git_compat.pyabstraction layer that supports both GitPython and pygit2 backends.How it works
CM_USE_PYGIT2=1is set (by Desktop 2.0 Launcher via PR #274), or when system git is unavailable, the pygit2 backend is used automaticallyFiles changed
comfyui_manager/common/git_compat.py— new wrapper with abstractGitRepobase class,_GitPythonRepo(1:1 pass-throughs),_Pygit2Repoimplementationcomfyui_manager/glob/manager_core.py— 14git.Repousages convertedcomfyui_manager/common/git_helper.py— 7git.Repousages converted (standalone subprocess script)comfyui_manager/common/context.py—get_comfyui_tag()convertedcomfyui_manager/glob/utils/environment_utils.py—print_comfyui_version()+setup_environment()convertedcm_cli/__main__.py—check_comfyui_hash()convertedcomfyui_manager/common/timestamp_utils.py—repo.headsusage convertedtests/test_git_compat.py— 47 tests comparing both backends via subprocess isolationAdditional fixes
get_script_env()propagatesCM_USE_PYGIT2to subprocesses🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.