Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submodules not treated properly leading to crash/failure #107

Open
fuulish opened this issue Sep 6, 2021 · 0 comments
Open

Submodules not treated properly leading to crash/failure #107

fuulish opened this issue Sep 6, 2021 · 0 comments

Comments

@fuulish
Copy link

fuulish commented Sep 6, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant