aboutsummaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2006-04-01 16:35:06 -0800
committerJunio C Hamano <junkio@cox.net>2006-04-01 18:16:53 -0800
commitbe7db6e574b95c70ac544c78d74fdeea0fb4058d (patch)
tree51dc8b10ec5506709fa80480a3f24279400a7984 /revision.c
parent2a0925be3512451834ec9a3e023f4cff23c1cfb7 (diff)
downloadgit-be7db6e574b95c70ac544c78d74fdeea0fb4058d.tar.gz
git-be7db6e574b95c70ac544c78d74fdeea0fb4058d.tar.xz
revision: Fix --topo-order and --max-age with reachability limiting.
What ends up not working very well at all is the combination of "--topo-order" and the output filter in get_revision. It will return NULL when we see the first commit out of date-order, even if we have other commits coming. So we really should do the "past the date order" thing in get_revision() only if we have _not_ done it already in limit_list(). Something like this. The easiest way to test this is with just gitk --since=3.days.ago on the kernel tree. Without this patch, it tends to be pretty obviously broken. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/revision.c b/revision.c
index a8a54b658..558ed01a5 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;