fix(git_utils): allow duplicate vscode-merge-base sections with strict=False (#1561)

- Set ConfigParser strict mode to False
- Resolves issue #1529 by permitting section duplicates
- Allow `vscode-merge-base` to appear multiple times in `.git/config`
This commit is contained in:
Vanisper 2025-02-19 21:05:04 +08:00 committed by GitHub
parent 894042cd0e
commit df3cdfccb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,7 +40,8 @@ def git_url(fullpath):
if not os.path.exists(git_config_path): if not os.path.exists(git_config_path):
return None return None
config = configparser.ConfigParser() # Set `strict=False` to allow duplicate `vscode-merge-base` sections, addressing <https://github.com/ltdrdata/ComfyUI-Manager/issues/1529>
config = configparser.ConfigParser(strict=False)
config.read(git_config_path) config.read(git_config_path)
for k, v in config.items(): for k, v in config.items():