Merge branch 'js/no-limit-boundary'

* js/no-limit-boundary:
  rev-list --max-age, --max-count: support --boundary
This commit is contained in:
Junio C Hamano 2007-02-24 01:47:56 -08:00
commit 503ca3a9f2

View File

@ -1233,9 +1233,15 @@ static struct commit *get_revision_1(struct rev_info *revs)
*/ */
if (!revs->limited) { if (!revs->limited) {
if (revs->max_age != -1 && if (revs->max_age != -1 &&
(commit->date < revs->max_age)) (commit->date < revs->max_age)) {
if (revs->boundary)
commit->object.flags |=
BOUNDARY_SHOW | BOUNDARY;
else
continue; continue;
add_parents_to_list(revs, commit, &revs->commits); } else
add_parents_to_list(revs, commit,
&revs->commits);
} }
if (commit->object.flags & SHOWN) if (commit->object.flags & SHOWN)
continue; continue;
@ -1336,6 +1342,17 @@ struct commit *get_revision(struct rev_info *revs)
case -1: case -1:
break; break;
case 0: case 0:
if (revs->boundary) {
struct commit_list *list = revs->commits;
while (list) {
list->item->object.flags |=
BOUNDARY_SHOW | BOUNDARY;
list = list->next;
}
/* all remaining commits are boundary commits */
revs->max_count = -1;
revs->limited = 1;
} else
return NULL; return NULL;
default: default:
revs->max_count--; revs->max_count--;