summaryrefslogtreecommitdiff
path: root/git/objects/submodule/base.py
diff options
context:
space:
mode:
authorDominic <yobmod@gmail.com>2021-08-03 16:40:48 +0100
committerGitHub <noreply@github.com>2021-08-03 16:40:48 +0100
commitfe54118ec07a68d5dc6f6108510cffc55dfca643 (patch)
tree3025974ca54ef607ee3d4660da4dc242e184f8ea /git/objects/submodule/base.py
parentd8a639865d02a6bb3f93a233d3caa928d18bc622 (diff)
parent84232f7c71e41e56636f203eb26763a03ab6e945 (diff)
downloadgitpython-fe54118ec07a68d5dc6f6108510cffc55dfca643.tar.gz
Merge pull request #1311 from Yobmod/main
Drop 3.6, increase type strictness
Diffstat (limited to 'git/objects/submodule/base.py')
-rw-r--r--git/objects/submodule/base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py
index 559d2585..d306c91d 100644
--- a/git/objects/submodule/base.py
+++ b/git/objects/submodule/base.py
@@ -379,6 +379,7 @@ class Submodule(IndexObject, TraversableIterableObj):
:return: The newly created submodule instance
:note: works atomically, such that no change will be done if the repository
update fails for instance"""
+
if repo.bare:
raise InvalidGitRepositoryError("Cannot add submodules to bare repositories")
# END handle bare repos
@@ -434,7 +435,7 @@ class Submodule(IndexObject, TraversableIterableObj):
url = urls[0]
else:
# clone new repo
- kwargs: Dict[str, Union[bool, int, Sequence[TBD]]] = {'n': no_checkout}
+ kwargs: Dict[str, Union[bool, int, str, Sequence[TBD]]] = {'n': no_checkout}
if not branch_is_default:
kwargs['b'] = br.name
# END setup checkout-branch