files: don't pre load heavy attributes to compute file search

This commit is contained in:
RhodeCode Admin 2023-08-21 13:46:15 +02:00
parent 86c35d3d9b
commit 724e6b4a15

View file

@ -605,8 +605,11 @@ class ScmModel(BaseModel):
_repo = self._get_repo(repo_name)
commit = _repo.scm_instance().get_commit(commit_id=commit_id)
root_path = root_path.lstrip('/')
for __, dirs, files in commit.walk(root_path):
top_node = commit.get_node(root_path)
top_node.default_pre_load = []
for __, dirs, files in commit.walk(top_node):
for f in files:
_data = {