diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py index 1b94f5221..500c175f4 100644 --- a/git/objects/submodule/base.py +++ b/git/objects/submodule/base.py @@ -657,7 +657,7 @@ def remove(self, module=True, force=False, configuration=True, dry_run=False): num_branches_with_new_commits = 0 rrefs = remote.refs for rref in rrefs: - num_branches_with_new_commits = len(mod.git.cherry(rref)) != 0 + 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):