diff options
Diffstat (limited to 'git/diff.py')
-rw-r--r-- | git/diff.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/git/diff.py b/git/diff.py index 897228a7..7a06f3a1 100644 --- a/git/diff.py +++ b/git/diff.py @@ -283,7 +283,8 @@ class Diff(object): if repo and a_rawpath: for submodule in repo.submodules: if submodule.path == a_rawpath.decode("utf-8"): - repo = submodule.module() + if submodule.module_exists(): + repo = submodule.module() break if a_blob_id is None or a_blob_id == self.NULL_HEX_SHA: |