diff options
-rw-r--r-- | git/objects/submodule/base.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py index 446c88fc..a75826eb 100644 --- a/git/objects/submodule/base.py +++ b/git/objects/submodule/base.py @@ -1184,8 +1184,9 @@ class Submodule(IndexObject, Iterable, Traversable): entry = index.entries[index.entry_key(p, 0)] sm = Submodule(repo, entry.binsha, entry.mode, entry.path) except KeyError: - raise InvalidGitRepositoryError( - "Gitmodule path %r did not exist in revision of parent commit %s" % (p, parent_commit)) + # The submodule doesn't exist, probably it wasn't + # removed from the .gitmodules file. + continue # END handle keyerror # END handle critical error |