revision: "simplify" options imply topo-order sort

The code internally runs sort_in_topo_order() already; it is more clear to spell it out in the option parsing phase, instead of adding a special case in simplify_merges() function.

Junio C Hamano committed Jun 8, 2012 at 14:47 UTC a52f00711321f1c60f9e8ee4434cb5ddc43f6b64
1 file changed +2 -2
revision.c
+2 -2
@@ -1358,11 +1358,13 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
1358 revs->topo_order = 1;
1359 } else if (!strcmp(arg, "--simplify-merges")) {
1360 revs->simplify_merges = 1;
1361 + revs->topo_order = 1;
1362 revs->rewrite_parents = 1;
1363 revs->simplify_history = 0;
1364 revs->limited = 1;
1365 } else if (!strcmp(arg, "--simplify-by-decoration")) {
1366 revs->simplify_merges = 1;
1367 + revs->topo_order = 1;
1368 revs->rewrite_parents = 1;
1369 revs->simplify_history = 0;
1370 revs->simplify_by_decoration = 1;
@@ -2016,8 +2018,6 @@ static void simplify_merges(struct rev_info *revs)
2018 struct commit_list *list;
2019 struct commit_list *yet_to_do, **tail;
2020
2019 - if (!revs->topo_order)
2020 - sort_in_topological_order(&revs->commits, revs->lifo);
2021 if (!revs->prune)
2022 return;
2023