From 5eac739e05620e491555850d5b513ef60595c016 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 14 Aug 2008 13:52:36 -0700 Subject: [PATCH] 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 --- revision.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/revision.c b/revision.c index 8cd39da2e..db2ab2b11 100644 --- a/revision.c +++ b/revision.c @@ -1518,7 +1518,10 @@ static void simplify_merges(struct rev_info *revs) struct commit_list *list; struct commit_list *yet_to_do, **tail; - sort_in_topological_order(&revs->commits, revs->lifo); + if (!revs->topo_order) + sort_in_topological_order(&revs->commits, revs->lifo); + if (!revs->prune) + return; /* feed the list reversed */ yet_to_do = NULL; -- 2.26.2