Fix LFS register (it needs json not data)

Refactored the LFS Oid handling in its class of its own and
add a way to recheck all LFS handles (or re-register)
This commit is contained in:
Stephan Kulow
2022-11-09 08:32:18 +01:00
parent f5b29886ae
commit 7861a7e9b0
3 changed files with 134 additions and 56 deletions

View File

@@ -6,6 +6,7 @@ import yaml
from lib.binary import is_binary_or_large
from lib.db import DB
from lib.git import Git
from lib.lfs_oid import LFSOid
from lib.obs import OBS
from lib.proxy_sha256 import ProxySHA256
from lib.tree_builder import TreeBuilder
@@ -60,6 +61,8 @@ class GitExporter:
return left_to_commit
def export_as_git(self):
if os.getenv("CHECK_ALL_LFS"):
LFSOid.check_all(self.db, self.package)
tree = TreeBuilder(self.db).build(self.project, self.package)
flats = tree.as_flat_list()