revision --simplify-merges: make it a no-op without pathspec
When we are not pruning there is no reason to run the merge simplification. Also avoid running topo-order sort twice. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Aug 14, 2008 at 13:52 UTC
5eac739e05620e491555850d5b513ef60595c016
1 file changed
+4
-1
revision.c
+4
-1
@@ -1518,7 +1518,10 @@ static void simplify_merges(struct rev_info *revs)
1518
struct commit_list *list;
1519
struct commit_list *yet_to_do, **tail;
1520
1521
- sort_in_topological_order(&revs->commits, revs->lifo);
1521
+ if (!revs->topo_order)
1522
+ sort_in_topological_order(&revs->commits, revs->lifo);
1523
+ if (!revs->prune)
1524
+ return;
1525
1526
/* feed the list reversed */
1527
yet_to_do = NULL;