# HG changeset patch # User RhodeCode Admin # Date 2022-04-07 15:40:34 # Node ID 127b0594f0cc5405c7cd346923e47db6a93801b6 # Parent da0b3be2fc66d3824e8d6e0175e771efe40a9773 git: handle archive generation crash case when submodules are present. diff --git a/vcsserver/git.py b/vcsserver/git.py --- a/vcsserver/git.py +++ b/vcsserver/git.py @@ -1241,7 +1241,10 @@ class GitRemote(RemoteBase): file_path = fn.path mode = fn.mode is_link = stat.S_ISLNK(mode) - yield ArchiveNode(file_path, mode, is_link, repo[fn.id].read_raw) + if mode == pygit2.GIT_FILEMODE_COMMIT: + log.debug('Skipping path %s as a commit node', file_path) + continue + yield ArchiveNode(file_path, mode, is_link, repo[fn.hex].read_raw) return archive_repo(file_walker, archive_dest_path, kind, mtime, archive_at_path, archive_dir_name, commit_id)