Skip to content

Commit 553500a

Browse files
tanaga9Byron
authored andcommitted
Check if submodule exists before referencing
1 parent ebf4656 commit 553500a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎git/diff.py‎

Lines 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
ifrepoanda_rawpath:
284284
forsubmoduleinrepo.submodules:
285285
ifsubmodule.path==a_rawpath.decode("utf-8"):
286-
repo=submodule.module()
286+
ifsubmodule.module_exists():
287+
repo=submodule.module()
287288
break
288289

289290
ifa_blob_idisNoneora_blob_id==self.NULL_HEX_SHA:

0 commit comments

Comments
(0)