diff options
author | Junio C Hamano <junkio@cox.net> | 2007-02-24 01:47:56 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-02-24 01:47:56 -0800 |
commit | 503ca3a9f23a803080f844f58efcd5b2b1e17a86 (patch) | |
tree | e9b990a2eb54f47d3cae3333d7dc276b12fc9ca0 /revision.c | |
parent | cc58fc0684396c5298b21c97f00a568e46224258 (diff) | |
parent | c4025103faf02a1b457b945cf5e4e12c97fa72d7 (diff) | |
download | git-503ca3a9f23a803080f844f58efcd5b2b1e17a86.tar.gz |
Merge branch 'js/no-limit-boundary'
* js/no-limit-boundary:
rev-list --max-age, --max-count: support --boundary
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/revision.c b/revision.c index 622afe3aa6..4cf697e2c1 100644 --- a/revision.c +++ b/revision.c @@ -1233,9 +1233,15 @@ static struct commit *get_revision_1(struct rev_info *revs) */ 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; @@ -1336,7 +1342,18 @@ struct commit *get_revision(struct rev_info *revs) 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--; } |