diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/rev-list.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/rev-list.c b/builtin/rev-list.c index 7ae255862a..a963564617 100644 --- a/builtin/rev-list.c +++ b/builtin/rev-list.c @@ -355,8 +355,11 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix) if (use_bitmap_index && !revs.prune) { if (revs.count && !revs.left_right && !revs.cherry_mark) { uint32_t commit_count; + int max_count = revs.max_count; if (!prepare_bitmap_walk(&revs)) { count_bitmap_commit_list(&commit_count, NULL, NULL, NULL); + if (max_count >= 0 && max_count < commit_count) + commit_count = max_count; printf("%d\n", commit_count); return 0; } |