summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c1babb1)
raw | patch | inline | side by side (parent: c1babb1)
author | Linus Torvalds <torvalds@osdl.org> | |
Wed, 21 Sep 2005 00:55:46 +0000 (17:55 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 21 Sep 2005 01:11:34 +0000 (18:11 -0700) |
The trick is to consider the time-based filtering a limiter, the same way
we do for release ranges.
That means that the time-based filtering runs _before_ the topological
sorting, which makes it meaningful again. It also simplifies the code
logic.
This makes "gitk" useful with time ranges.
[ Second version: --merge-order now unaffected by the re-org ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
we do for release ranges.
That means that the time-based filtering runs _before_ the topological
sorting, which makes it meaningful again. It also simplifies the code
logic.
This makes "gitk" useful with time ranges.
[ Second version: --merge-order now unaffected by the re-org ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
rev-list.c | patch | blob | history |
diff --git a/rev-list.c b/rev-list.c
index e41d5a045c3192f4759aa5b2e4881f28f92ed68f..523fda07e1eef4b3a1a801abbf94358d06af17fd 100644 (file)
--- a/rev-list.c
+++ b/rev-list.c
return CONTINUE;
if (max_age != -1 && (commit->date < max_age)) {
stop_traversal=1;
- return merge_order?CONTINUE:STOP;
+ return CONTINUE;
}
if (max_count != -1 && !max_count--)
return STOP;
struct commit *commit = pop_most_recent_commit(&list, SEEN);
struct object *obj = &commit->object;
+ if (max_age != -1 && (commit->date < max_age))
+ obj->flags |= UNINTERESTING;
if (unpacked && has_sha1_pack(obj->sha1))
obj->flags |= UNINTERESTING;
if (obj->flags & UNINTERESTING) {
break;
continue;
}
+ if (min_age != -1 && (commit->date > min_age))
+ continue;
p = &commit_list_insert(commit, p)->next;
}
if (tree_objects)
}
if (!strncmp(arg, "--max-age=", 10)) {
max_age = atoi(arg + 10);
+ limited = 1;
continue;
}
if (!strncmp(arg, "--min-age=", 10)) {
min_age = atoi(arg + 10);
+ limited = 1;
continue;
}
if (!strcmp(arg, "--header")) {