aboutsummaryrefslogtreecommitdiffstats
path: root/rev-list.c
diff options
context:
space:
mode:
authorJon Seymour <jon.seymour@gmail.com>2005-07-07 02:39:34 +1000
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-06 10:28:02 -0700
commitd2775a817a19d966ec35a1da9440e2feb55276f4 (patch)
tree0da6a7e9e421b651e2d1dcd442f3086a6820f451 /rev-list.c
parentd2d02a490669320054065556a61c44b9ac851a07 (diff)
downloadgit-d2775a817a19d966ec35a1da9440e2feb55276f4.tar.gz
[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>
Diffstat (limited to 'rev-list.c')
-rw-r--r--rev-list.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/rev-list.c b/rev-list.c
index f41adebd8a..c4a6151343 100644
--- a/rev-list.c
+++ b/rev-list.c
@@ -71,19 +71,15 @@ static void show_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;
if (commit->object.flags & (UNINTERESTING|SHOWN))
return CONTINUE;
if (min_age != -1 && (commit->date > min_age))
return CONTINUE;
if (max_age != -1 && (commit->date < max_age)) {
- if (!merge_order)
- return STOP;
- else {
- stop_traversal = 1;
- return CONTINUE;
- }
+ stop_traversal=1;
+ return merge_order?CONTINUE:STOP;
}
if (max_count != -1 && !max_count--)
return STOP;