[PATCH] Tidy up - slight simplification of rev-list.c

This patch implements a small tidy up of rev-list.c to reduce
(but not eliminate) the amount of ugliness associated
with the merge_order flag.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Jon Seymour 2005-07-07 02:39:34 +10:00 committed by Linus Torvalds
parent d2d02a4906
commit d2775a817a

View File

@ -71,19 +71,15 @@ static void show_commit(struct commit *commit)
static int filter_commit(struct commit * commit) static int filter_commit(struct commit * commit)
{ {
if (merge_order && stop_traversal && commit->object.flags & BOUNDARY) if (stop_traversal && (commit->object.flags & BOUNDARY))
return STOP; return STOP;
if (commit->object.flags & (UNINTERESTING|SHOWN)) if (commit->object.flags & (UNINTERESTING|SHOWN))
return CONTINUE; return CONTINUE;
if (min_age != -1 && (commit->date > min_age)) if (min_age != -1 && (commit->date > min_age))
return CONTINUE; return CONTINUE;
if (max_age != -1 && (commit->date < max_age)) { if (max_age != -1 && (commit->date < max_age)) {
if (!merge_order) stop_traversal=1;
return STOP; return merge_order?CONTINUE:STOP;
else {
stop_traversal = 1;
return CONTINUE;
}
} }
if (max_count != -1 && !max_count--) if (max_count != -1 && !max_count--)
return STOP; return STOP;