fix pygit2 (#536)

This commit is contained in:
lllyasviel
2023-10-04 13:09:34 -07:00
committed by GitHub
parent ba58dbc8bc
commit 4c0a16d9bc
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
version = '2.0.85' version = '2.0.86'
+2
View File
@@ -58,6 +58,8 @@ def git_clone(url, dir, name, hash=None):
commit = repo.get(hash) commit = repo.get(hash)
repo.checkout_tree(commit, strategy=pygit2.GIT_CHECKOUT_FORCE) repo.checkout_tree(commit, strategy=pygit2.GIT_CHECKOUT_FORCE)
repo.set_head(commit.id)
print(f'{name} checkout finished for {hash}.') print(f'{name} checkout finished for {hash}.')
except Exception as e: except Exception as e:
print(f'Git clone failed for {name}: {str(e)}') print(f'Git clone failed for {name}: {str(e)}')