summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 437b1b2)
raw | patch | inline | side by side (parent: 437b1b2)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Mon, 19 Feb 2007 02:14:59 +0000 (03:14 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 20 Feb 2007 03:07:01 +0000 (19:07 -0800) |
Now, when saying --max-age=<timestamp>, or --max-count=<n>, together
with --boundary, rev-list prints the boundary commits, i.e. the
commits which are _just_ not shown without --boundary, i.e. their
children are, but they aren't.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
with --boundary, rev-list prints the boundary commits, i.e. the
commits which are _just_ not shown without --boundary, i.e. their
children are, but they aren't.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
revision.c | patch | blob | history |
diff --git a/revision.c b/revision.c
index 15bdaf6095ccbe690c664f80a5b25e354d068d61..4f298bacc79c801a658d40b31bc4a46f8ab96375 100644 (file)
--- a/revision.c
+++ b/revision.c
*/
if (!revs->limited) {
if (revs->max_age != -1 &&
- (commit->date < revs->max_age))
- continue;
- add_parents_to_list(revs, commit, &revs->commits);
+ (commit->date < revs->max_age)) {
+ if (revs->boundary)
+ commit->object.flags |=
+ BOUNDARY_SHOW | BOUNDARY;
+ else
+ continue;
+ } else
+ add_parents_to_list(revs, commit,
+ &revs->commits);
}
if (commit->object.flags & SHOWN)
continue;
case -1:
break;
case 0:
- return NULL;
+ 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;
default:
revs->max_count--;
}