diff --git a/swh/vault/cookers/git_bare.py b/swh/vault/cookers/git_bare.py --- a/swh/vault/cookers/git_bare.py +++ b/swh/vault/cookers/git_bare.py @@ -27,6 +27,7 @@ from typing import Any, Dict, Iterable, List, Set import zlib +from swh.core.api.classes import stream_results from swh.graph.client import GraphArgumentException from swh.model import identifiers from swh.model.hashutil import hash_to_bytehex, hash_to_hex @@ -253,7 +254,10 @@ def load_directory(self, obj_id: Sha1Git) -> None: # Load the directory - entries = list(self.storage.directory_ls(obj_id, recursive=False)) + entries = [ + entry.to_dict() + for entry in stream_results(self.storage.directory_get_entries, obj_id) + ] directory = {"id": obj_id, "entries": entries} git_object = identifiers.directory_git_object(directory) self.write_object(obj_id, git_object)