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:
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 aKeyError
being thrown:https://github.com/aspiers/git-deps/blob/5dd7f4c4b6d4d771c5b6866b8256eb1bad632843/git_deps/detector.py#L344
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: https://github.com/fuulish/git-deps/commit/1c55add39712b77994a95fb0a68745a94cccde79This 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: https://github.com/fuulish/git-deps/commit/2fd1455635a1f0882dd6e6733b6f6850155e7ce9
Let me know what you think.