@matheusbsbs / matheus-bagliano / commits / 07f9247722
Fork 0

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>

Luben Tuikov committed Nov 18, 2005 at 16:29 UTC 07f92477227e2a1770dfbb6318caedc4f091f6c1
1 file changed +3 -2
rev-list.c
+3 -2
@@ -124,8 +124,6 @@ static int filter_commit(struct commit * commit)
124 stop_traversal=1;
125 return CONTINUE;
126 }
127 - if (max_count != -1 && !max_count--)
128 - return STOP;
127 if (no_merges && (commit->parents && commit->parents->next))
128 return CONTINUE;
129 if (paths && dense) {
@@ -148,6 +146,9 @@ static int process_commit(struct commit * commit)
146 return CONTINUE;
147 }
148
149 + if (max_count != -1 && !max_count--)
150 + return STOP;
151 +
152 show_commit(commit);
153
154 return CONTINUE;