From: Junio C Hamano Date: Thu, 14 Aug 2008 20:52:36 +0000 (-0700) Subject: revision --simplify-merges: make it a no-op without pathspec X-Git-Tag: v1.6.1-rc1~275^2~1^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5eac739e05620e491555850d5b513ef60595c016;p=git.git 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 --- 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;