X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=revision.c;h=558ed01a5172d07c3af55ae2279d01bb0d6a5223;hb=be7db6e574b95c70ac544c78d74fdeea0fb4058d;hp=a8a54b658029606839853daf1cee380833486dd4;hpb=2a0925be3512451834ec9a3e023f4cff23c1cfb7;p=git.git diff --git a/revision.c b/revision.c index a8a54b65..558ed01a 100644 --- a/revision.c +++ b/revision.c @@ -783,10 +783,14 @@ struct commit *get_revision(struct rev_info *revs) /* * If we haven't done the list limiting, we need to look at - * the parents here + * the parents here. We also need to do the date-based limiting + * that we'd otherwise have done in limit_list(). */ - if (!revs->limited) + if (!revs->limited) { + if (revs->max_age != -1 && (commit->date < revs->max_age)) + continue; add_parents_to_list(revs, commit, &revs->commits); + } if (commit->object.flags & SHOWN) continue; if (!(commit->object.flags & BOUNDARY) && @@ -794,8 +798,6 @@ struct commit *get_revision(struct rev_info *revs) continue; if (revs->min_age != -1 && (commit->date > revs->min_age)) continue; - if (revs->max_age != -1 && (commit->date < revs->max_age)) - return NULL; if (revs->no_merges && commit->parents && commit->parents->next) continue;