diff options
author | Yaroslav Halchenko <debian@onerussian.com> | 2016-10-01 22:50:07 -0400 |
---|---|---|
committer | Yaroslav Halchenko <debian@onerussian.com> | 2016-10-01 22:50:07 -0400 |
commit | f2b92c66bed6d1eea7b8aefe3405b0898fbb2019 (patch) | |
tree | 3b1a77deb24799e30e603417ced10ef36040afb2 | |
parent | b3b9c0242ba2893231e0ab1c13fa2a0c8a9cfc59 (diff) | |
download | gitpython-f2b92c66bed6d1eea7b8aefe3405b0898fbb2019.tar.gz |
BF: Allow to remove a submodule with a remote without refs
-rw-r--r-- | git/objects/submodule/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py index c6c6d699..90f796bd 100644 --- a/git/objects/submodule/base.py +++ b/git/objects/submodule/base.py @@ -836,7 +836,7 @@ class Submodule(util.IndexObject, Iterable, Traversable): num_branches_with_new_commits += len(mod.git.cherry(rref)) != 0 # END for each remote ref # not a single remote branch contained all our commits - if num_branches_with_new_commits == len(rrefs): + if len(rrefs) and num_branches_with_new_commits == len(rrefs): raise InvalidGitRepositoryError( "Cannot delete module at %s as there are new commits" % mod.working_tree_dir) # END handle new commits |