diff options
author | Luben Tuikov <ltuikov@yahoo.com> | 2005-11-18 16:29:04 -0500 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-11-21 21:50:00 -0800 |
commit | 07f92477227e2a1770dfbb6318caedc4f091f6c1 (patch) | |
tree | be9697305c8bb150d09af79b190b4c1d8ea4eb17 /rev-list.c | |
parent | c3df8568424684bbcc7df7722eb3ec34bdae8b2d (diff) | |
download | git-07f92477227e2a1770dfbb6318caedc4f091f6c1.tar.gz git-07f92477227e2a1770dfbb6318caedc4f091f6c1.tar.xz |
max-count in terms of intersection
When a path designation is given, max-count counts the number
of commits therein (intersection), not globally.
This avoids the case where in case path has been inactive
for the last N commits, --max-count=N and path designation
at git-rev-list is given, would give no commits.
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'rev-list.c')
-rw-r--r-- | rev-list.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rev-list.c b/rev-list.c index 6e6ffde39..e17f92806 100644 --- a/rev-list.c +++ b/rev-list.c @@ -124,8 +124,6 @@ static int filter_commit(struct commit * commit) stop_traversal=1; return CONTINUE; } - if (max_count != -1 && !max_count--) - return STOP; if (no_merges && (commit->parents && commit->parents->next)) return CONTINUE; if (paths && dense) { @@ -148,6 +146,9 @@ static int process_commit(struct commit * commit) return CONTINUE; } + if (max_count != -1 && !max_count--) + return STOP; + show_commit(commit); return CONTINUE; |