1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-07 16:36:13 +02:00

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>
This commit is contained in:
Luben Tuikov 2005-11-18 16:29:04 -05:00 committed by Junio C Hamano
parent c3df856842
commit 07f9247722

View File

@ -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;