summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/revision.c b/revision.c
index 8cd39da2ef..db2ab2b11a 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;