summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/git/objects/commit.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/git/objects/commit.py b/lib/git/objects/commit.py
index 80b3ad23..4ec806fb 100644
--- a/lib/git/objects/commit.py
+++ b/lib/git/objects/commit.py
@@ -116,7 +116,13 @@ class Commit(base.Object, Iterable, diff.Diffable):
Returns
int
"""
- return len(self.repo.git.rev_list(self.sha, '--', paths, **kwargs).strip().splitlines())
+ # yes, it makes a difference whether empty paths are given or not in our case
+ # as the empty paths version will ignore merge commits for some reason.
+ if paths:
+ return len(self.repo.git.rev_list(self.sha, '--', paths, **kwargs).splitlines())
+ else:
+ return len(self.repo.git.rev_list(self.sha, **kwargs).splitlines())
+
@property
def name_rev(self):