diff options
author | Yobmod <yobmod@gmail.com> | 2021-07-31 22:26:20 +0100 |
---|---|---|
committer | Yobmod <yobmod@gmail.com> | 2021-07-31 22:26:20 +0100 |
commit | 39d37d550963a6a64e66ba3d6b9f4b077270a3ad (patch) | |
tree | 0f5f7d75ffc4ac1d6abc689d6739d7077adf7d27 /git/objects/submodule | |
parent | 2a350b57ce79a0e1b71623d1146c52918232e074 (diff) | |
download | gitpython-39d37d550963a6a64e66ba3d6b9f4b077270a3ad.tar.gz |
replace some TBDs wiht runtime types
Diffstat (limited to 'git/objects/submodule')
-rw-r--r-- | git/objects/submodule/base.py | 3 |
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 |