Skip to content

Submodules not treated properly leading to crash/failure #107

@fuulish

Description

@fuulish

When commits include submodules, the respective dependencies cannot be resolved. The submodule commit OID contains the hash of the submodule commit. This commit is not present in the instance of the parent repo.
At the following place in the tree_lookup, this will lead to a KeyError being thrown:

tree_or_blob = self.repo[tree_or_blob[dirent].oid]

A simple fix would be to check first whether the OID is contained in the repo and simply return None if it's not, something like this: fuulish@1c55add

This ignores submodule dependencies. However, submodule-related changes are linearly dependent on their respective parent changes. Hence, a proper solution should include the actual dependency chain. One suggestion could be like the following: fuulish@2fd1455

Let me know what you think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions