From fa2c150b197b907b18714d3a2cc5f5cefa55d5ab Mon Sep 17 00:00:00 2001 From: rcoup Date: Tue, 6 Apr 2021 16:33:47 +0100 Subject: [PATCH] libgit2: disable strict hash verification Disables strict verification of object hashsums when reading objects from disk. Eliminates an additional checksum calculation on each object. https://github.com/libgit2/libgit2/search?q=GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION&type=issues --- sno/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sno/__init__.py b/sno/__init__.py index b7c4836eb..2cfca27cf 100644 --- a/sno/__init__.py +++ b/sno/__init__.py @@ -75,10 +75,14 @@ ogr.UseExceptions() osr.UseExceptions() +# Libgit2 options +import pygit2 + +pygit2.option(pygit2.GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION, 0) + # Libgit2 TLS CA Certificates # We build libgit2 to prefer the OS certificate store on Windows/macOS, but Linux doesn't have one. if is_linux: import certifi - import pygit2 pygit2.settings.ssl_cert_file = certifi.where()