summaryrefslogtreecommitdiff
path: root/lib/git
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-15 00:06:08 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-15 00:06:08 +0200
commit1a4bfd979e5d4ea0d0457e552202eb2effc36cac (patch)
tree10f70f8e41c91f5bf57f04b616f3e5afdb9f8407 /lib/git
parent7cdfaceebe916c91acdf8de3f9506989bc70ad65 (diff)
downloadgitpython-1a4bfd979e5d4ea0d0457e552202eb2effc36cac.tar.gz
test_performance: module containing benchmarks to get an idea of the achieved throughput
repo.commits: max_count is None by default moved benchmark-like test from test_commit to test_performance
Diffstat (limited to 'lib/git')
-rw-r--r--lib/git/repo.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/git/repo.py b/lib/git/repo.py
index f07edbe0..c74c7e8d 100644
--- a/lib/git/repo.py
+++ b/lib/git/repo.py
@@ -197,7 +197,7 @@ class Repo(object):
# END distinguish hexsha vs other information
return blames
- def commits(self, start='master', path='', max_count=10, skip=0):
+ def commits(self, start='master', path='', max_count=None, skip=0):
"""
A list of Commit objects representing the history of a given ref/commit
@@ -209,7 +209,7 @@ class Repo(object):
Commits that do not contain that path will not be returned.
``max_count``
- is the maximum number of commits to return (default 10)
+ is the maximum number of commits to return (default None)
``skip``
is the number of commits to skip (default 0) which will effectively
@@ -220,7 +220,10 @@ class Repo(object):
"""
options = {'max_count': max_count,
'skip': skip}
-
+
+ if max_count is None:
+ options.pop('max_count')
+
return Commit.list_items(self, start, path, **options)
def commits_between(self, frm, to):