From 9e5e969479ec6018e1ba06b95bcdefca5b0082a4 Mon Sep 17 00:00:00 2001 From: Yobmod Date: Mon, 19 Jul 2021 19:10:45 +0100 Subject: Change remaining type comments to py3.6+ types --- git/objects/submodule/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'git/objects/submodule') diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py index 21cfcd5a..d5ba118f 100644 --- a/git/objects/submodule/base.py +++ b/git/objects/submodule/base.py @@ -475,7 +475,8 @@ class Submodule(IndexObject, TraversableIterableObj): sm._branch_path = br.path # we deliberately assume that our head matches our index ! - sm.binsha = mrepo.head.commit.binsha # type: ignore + if mrepo: + sm.binsha = mrepo.head.commit.binsha index.add([sm], write=True) return sm -- cgit v1.2.1