@matheusbsbs / matheus-bagliano / commits / 22c31bf183
Fork 0

revision: --topo-order and --unpacked

Now, using --unpacked without limit_list() does not make much sense, but this is parallel to the earlier --max-age fix. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Apr 1, 2006 at 18:52 UTC 22c31bf183bff576c7807f9d67abfc11ee8e1fa4
1 file changed +4 -1
revision.c
+4 -1
@@ -787,7 +787,10 @@ struct commit *get_revision(struct rev_info *revs)
787 * that we'd otherwise have done in limit_list().
788 */
789 if (!revs->limited) {
790 - if (revs->max_age != -1 && (commit->date < revs->max_age))
790 + if ((revs->unpacked &&
791 + has_sha1_pack(commit->object.sha1)) ||
792 + (revs->max_age != -1 &&
793 + (commit->date < revs->max_age)))
794 continue;
795 add_parents_to_list(revs, commit, &revs->commits);
796 }