Skip to content

Commit a77a17f

Browse files
stsewdByron
authored andcommitted
Skip on keyerror
1 parent 21b1767 commit a77a17f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎git/objects/submodule/base.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1184,8 +1184,9 @@ def iter_items(cls, repo, parent_commit='HEAD'):
11841184
entry = index.entries[index.entry_key(p, 0)]
11851185
sm = Submodule(repo, entry.binsha, entry.mode, entry.path)
11861186
except KeyError:
1187-
raise InvalidGitRepositoryError(
1188-
"Gitmodule path %r did not exist in revision of parent commit %s" % (p, parent_commit))
1187+
# The submodule doesn't exist, probably it wasn't
1188+
# removed from the .gitmodules file.
1189+
continue
11891190
# END handle keyerror
11901191
# END handle critical error
11911192

0 commit comments

Comments
 (0)