diff options
author | Yaroslav Halchenko <debian@onerussian.com> | 2016-10-01 22:50:07 -0400 |
---|---|---|
committer | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-03 00:54:25 +0200 |
commit | 6497d1e843cbaec2b86cd5a284bd95c693e55cc0 (patch) | |
tree | 7fa16be23c1cafcc0942d6a0d890e3467730ee40 | |
parent | 8a01ec439e19df83a2ff17d198118bd5a31c488b (diff) | |
download | gitpython-6497d1e843cbaec2b86cd5a284bd95c693e55cc0.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 |