{"thread":{"id":"1122","subject":"[PATCH] Tidy up - slight simplification of rev-list.c","startedAt":"2005-07-06T08:12:34Z","lastAt":"2005-07-06T08:12:34Z","messageCount":1,"participants":["Jon Seymour"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"5700","messageId":"20050706081234.14219.qmail@blackcubes.dyndns.org","threadId":"1122","inReplyTo":null,"subject":"[PATCH] Tidy up - slight simplification of rev-list.c","fromName":"Jon Seymour","fromEmail":"jon.seymour@gmail.com","sentAt":"2005-07-06T08:12:34Z","receivedAt":"2005-07-06T08:12:34Z","isPatch":true,"sender":{"key":"jon.seymour@gmail.com","avatar":"https://avatars.githubusercontent.com/u/207131?v=4"},"body":"\nThis patch implements a small tidy up of rev-list.c to reduce\n(but not eliminate) the amount of ugliness associated\nwith the merge_order flag.\n\nSigned-off-by: Jon Seymour <jon.seymour@gmail.com>\n---\nLinus: I decided not to abstract this out as a function\nas _too_ much abstraction can be a bad thing from a\nreadability point of view. Let me know if you disagree.\n---\n\n rev-list.c |   10 +++-------\n 1 files changed, 3 insertions(+), 7 deletions(-)\n\n34a034b978c6b946fafdf41b42c5f67ee9c94599\ndiff --git a/rev-list.c b/rev-list.c\n--- a/rev-list.c\n+++ b/rev-list.c\n@@ -78,19 +78,15 @@ static void show_commit(struct commit *c\n \n static int filter_commit(struct commit * commit)\n {\n-\tif (merge_order && stop_traversal && commit->object.flags & BOUNDARY)\n+\tif (stop_traversal && (commit->object.flags & BOUNDARY))\n \t\treturn STOP;\n \tif (commit->object.flags & (UNINTERESTING|SHOWN))\n \t\treturn CONTINUE;\n \tif (min_age != -1 && (commit->date > min_age))\n \t\treturn CONTINUE;\n \tif (max_age != -1 && (commit->date < max_age)) {\n-\t\tif (!merge_order)\n-\t\t\treturn STOP;\n-\t\telse {\n-\t\t\tstop_traversal = 1;\n-\t\t\treturn CONTINUE;\n-\t\t}\n+\t\tstop_traversal=1;\n+\t\treturn merge_order?CONTINUE:STOP;\n \t}\n \tif (max_count != -1 && !max_count--)\n \t\treturn STOP;\n------------\n"}]}