Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 553500a

Browse filesBrowse files
tanaga9Byron
authored andcommitted
Check if submodule exists before referencing
1 parent ebf4656 commit 553500a
Copy full SHA for 553500a

1 file changed

+2-1Lines changed: 2 additions & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎git/diff.py‎

Copy file name to clipboardExpand all lines: git/diff.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,8 @@ def __init__(self, repo, a_rawpath, b_rawpath, a_blob_id, b_blob_id, a_mode,
283283
if repo and a_rawpath:
284284
for submodule in repo.submodules:
285285
if submodule.path == a_rawpath.decode("utf-8"):
286-
repo = submodule.module()
286+
if submodule.module_exists():
287+
repo = submodule.module()
287288
break
288289

289290
if a_blob_id is None or a_blob_id == self.NULL_HEX_SHA:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.